Automatically generate simple IDs for case lists

Hi all,

We want to be able to automatically generate simple unique (e.g. 5 digits)
ID numbers within a form in CommCare. We then want to put this number into
our case list so that our users can easily search for specific cases.

Is this possible?

Thanks
Emily

Emily,

Please see this page
https://confluence.dimagi.com/display/commcarepublic/Generating+a+Random+Number
about generating random IDs of various lengths. Unfortunately, the
simpler/shorter the ID the more likely you are to have duplicate IDs as
your number of cases grows, so please keep this in mind when deciding the
ID length.

Cheers,
Will

··· On Fri, Aug 12, 2016 at 11:38 AM, Emily Tomkys wrote:

Hi all,

We want to be able to automatically generate simple unique (e.g. 5 digits)
ID numbers within a form in CommCare. We then want to put this number into
our case list so that our users can easily search for specific cases.

Is this possible?

Thanks
Emily

--
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.

OK great will take a look but is there a way to increment a simple ID
number? So then each case would be unique and easy to find?

Thanks
Emily

··· On Friday, August 12, 2016 at 4:38:03 PM UTC+1, Emily Tomkys wrote: > > Hi all, > > We want to be able to automatically generate simple unique (e.g. 5 digits) > ID numbers within a form in CommCare. We then want to put this number into > our case list so that our users can easily search for specific cases. > > Is this possible? > > Thanks > Emily >

For anyone interested, I added a hidden value with this caluclation
expression:

concat(instance('commcaresession')/session/context/username,'-',format-date(now(),
"%Y%m%d%H%M%S"))

This has worked perfectly

··· On Friday, August 12, 2016 at 4:38:03 PM UTC+1, Emily Tomkys wrote: > > Hi all, > > We want to be able to automatically generate simple unique (e.g. 5 digits) > ID numbers within a form in CommCare. We then want to put this number into > our case list so that our users can easily search for specific cases. > > Is this possible? > > Thanks > Emily >

Hi Emily,

This can generally be done easily with the User Case
https://confluence.dimagi.com/display/commcarepublic/User+Case feature
for users on standard plans or higher, you can keep track of an ongoing
count for each individual user and integrate that into an ID.

There are a few examples of different schemes for generating ID's with this
feature in the Google Group archive that you can search through to see how
other folks have integrated the feature into their workflow.

-Clayton

··· On Mon, Aug 15, 2016 at 11:45 AM, Emily Tomkys wrote:

OK great will take a look but is there a way to increment a simple ID
number? So then each case would be unique and easy to find?

Thanks
Emily

On Friday, August 12, 2016 at 4:38:03 PM UTC+1, Emily Tomkys wrote:

Hi all,

We want to be able to automatically generate simple unique (e.g. 5
digits) ID numbers within a form in CommCare. We then want to put this
number into our case list so that our users can easily search for specific
cases.

Is this possible?

Thanks
Emily

--
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.