how to generate a random number which has not been already generated for
any previous entry, i.e. each time I do a new entry in the form it should
generate a unique random number which has not been already used.
I think the random() function is what you are looking for. It is documented
here:
https://confluence.dimagi.com/display/commcarepublic/CommCare+Functions#CommCareFunctions-random
Thanks!
Abhishek
···
On Mon, May 5, 2014 at 2:01 AM, Anu Dutt wrote:how to generate a random number which has not been already generated for
any previous entry, i.e. each time I do a new entry in the form it should
generate a unique random number which has not been already used.--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Anu,
Just to clarify Abhishek's email, the random() function will generate a
random number but it *won't *guarantee that the number has not been used
before.
If you're using case management in your application (
Case Management - CommCare Public - CommCare Public), then
we will automatically generate a 32 character unique identifier for each
case.
What are you using this random number for?
Thanks,
Sheel
···
On Mon, May 5, 2014 at 12:33 AM, Abhishek Prateek wrote:I think the random() function is what you are looking for. It is
documented here:
CommCare Functions - CommCare Public - CommCare PublicThanks!
AbhishekOn Mon, May 5, 2014 at 2:01 AM, Anu Dutt handsomebog@gmail.com wrote:
how to generate a random number which has not been already generated for
any previous entry, i.e. each time I do a new entry in the form it should
generate a unique random number which has not been already used.--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah