Hi,
I’ve reviewed the suggestions in the forum and the support article Creating Unique Serial Numbers in Forms. In Enketo, this works. However, on KoboCollect, I can only see the Date in the IDNO, not the time which isn’t sufficient.
This is what I’ve used for the calculation (INTV and VILLAGE are numeric):
concat(${INTV}, ${VILLAGE}, substr(today(), 0, 4), substr(today(), 5, 7), substr(today(), 8, 10), substr(now(), 11, 13), substr(now(), 14, 16), substr(now(), 17, 19))
Where INTV=14, VILLAGE=2:
This is what I see in KoboCollect: 14220240513
This is what I see when I enter the same thing in Enketo: 14220240513123350
We are using KoboCollect for data collection. How can I ensure the IDNOs are unique and include the date and time?
Hint: Any calculation is recalculated on edit/save, so will change e.g. when you edit/save the case on server level after submission.
You may need to use once() function to avoid this for the ID.
Sorry, the link doesn’t show differences concerning the given calculation, with today() and now(). @Kal_Lam, please? What difference does exist for the now() function here?
I don’t need to use Date/Time in the unique ID. Is there a way to concat INTV, VILLAGE +1 for each case? For example, at the end of the day in Village 2, Interviewer 14 would have Cases 1421, 1422, 1423, 1424, etc. The next day in village 6 that last number could continue, eg 1465, 1466, or restart 1461, 1462. How do I add just a sequential number to a concatenated ID using 2 variables?
Thank you,
Sara