Generate new number (+1) on duplicate record
Generate new number (+1) on duplicate record
Hi,
I have a form and when a record is created for that client it checks how many records exist and adds 1 to give a new report number as below:
if(group_client != null)
{
ClientNo = client[ID == input.group_client].client_id;
Counter = group[group_client.client_id == ClientNo].count() + 1;
input.group_report_no = Counter;
}
It works a treat, however, when you duplicate the record the script obviously doesn't run and it just takes the number from the cloned record.
I thought perhaps triggering on duplicate, however, not supported from what I read
Does anyone have a solution to help, please
Regards