Avoid Regeneration of Unique Number

1. What is the problem? Be very detailed.
I am trying to generate a unique ID number in a form. However this unique number should not be regenerated if the user reopens the form. This is failing as each time it keeps creating a new number.

2. Device and operating system, version numbers.
I am running ODK Aggregate and developing my XLSForm.

3. What you have you tried to fix the problem?
I have tried to use a relevence to check if the variable contains a value inorder to skip but this does not work due to parabox.
I had to then use another variable which is just after this calculated variable. With this I am checking to see if the next variable has a value. If it has then the calculated field will not be executed. However the challenge is it removes the previously calculated field and brings an empty/null value.

Any help will be greatly appreciated, if there is any workaround this.


Hi @cmuchuchuti

have you tried once() function?

That is exactly what I wanted. Thanks a lot @Grzesiek2010.