Unique code for the submissions


I reviewed the topic for creating a unique id, and it works fine, but my case is slightly different than what was discussed. So my form needs to be edited a few times though out the project cycle so that when I want to use today’s formula or random number formula, the code will update whenever I need to update the form, so is there any way to keep the first code without changing in each edit of the form? I used the substr formula and combination of the few questions but the duplication number is still high so i would like to add random number without changing in each edit? Is it possible?

@osmanburcu, could you share a sample of your working XLSForm with the community? Try sharing only the relevant part of the XLSForm. The community should be able to help you out.

I will share it as a table directly for quick review, This is the only relevant, I would like to add random() formula to concat formula but random number should be static after the form’s submission

text case_manager_name Case Manager Name
date Date_of_Assessment_001 Date of Assessment:
text beneficiary_name Beneficiary Name
select_one locationp locationp Location of CMA (province)
calculate calculation concat(substr(${locationp},0,3), - ,substr(${case_manager_name},0,3),substr(${Date_of_Assessment_001},0,4),substr(${beneficiary_name},0,4))
note _calculation ${calculation}

For Future reference,

Random-created number changes every time you would like to edit your form, so if you would like to avoid it and only update whenever you would like to, you can use the trigger function. You can trigger the random number creation whenever you would like,

For example, now() formula will update automatically when you would like to edit your form, but with a trigger function, now() formula will update when you change the temp question. Otherwise, it will keep the first date of data entery.