I want policy number to an user “xxx-xxx-xxx” format and increment by 1 when every user created, can I do that
asked
Rohith Reddy Nandikanti
1 answers
3
Hi,
You could:
Create PolicyID field that is an auto number
Add an “after create” event to calculate the PolicyNumber.
Take the ID field, use Community Commons “String Left Pad” to turn the number to string with padded 0. With length 9… 1 → 000000001
You can then do some string manipulation like this to add the “-” in the appropriate places:
substring($str,0 , 3)+'-'+substring($str, 3, 6)+'-'+substring($str, 0, 3)+'-'+substring($str, 6, 9)