Auto generated unique identification numbers

Good morning, l am looking for guidance on how to create auto generated unique identification numbers. I have opened a case and l am registering group, so l want each group to have an auto generated unique identification number, when l ask the question Qn. What is the group identification number?

that's a little broad my friend

how long is that number? does it need to be only numbers? how unique does it need to be? etc...

check out rand and uuid functions
https://dimagi.atlassian.net/wiki/spaces/commcarepublic/pages/2143957589/CommCare+Functions

remember:
Default values calculate at the launch of the form/section
Calculate conditions fire all the time.
It will become clear why I am mentioning this once you play with this a bit :slight_smile: I won't spoil the surprise