Creating a unique id from multiple variables

Dear Kam,
Thanks for this solution.
in my case I want to generate an ID using the third letter of the name, the third letter of the sex and the rank (XSL from):
Example:
Name: Bazie
First name: Eric
Gender: Male
Rank: 5
ID (third letter of name, third letter of first name, first letter of sex, rank) = zim5

Thank

Hi @ericB,

Welcome tot he community! You could do the same as outlined in the image below:

In the survey tab of your xlsform:
Image 1

In the choices tab of your xlsform:
Image 2

Data entry screen as seen in Enketo:

Reference xlsform:
Unique-ID.xls (26.5 KB)

Have a great day!

1 Like