In order to create a guaranteed unique identifier for each instance of a
form, I propose to concatenate the device IMEI with the unix time derived
from the 'start' type date-time.
I realise I could just leave that date-time as a string (?) but it would be
ugly. I presume that I can parse the date-time string within ODK and
calculate unix time (I haven't yet looked at string parsing options) but
that will be uglier!
Is there a simple way to make this conversion?
Or is there a better/simpler way to make a unique identifier? There is
nothing else in my form that is certain to be present and unique.
Thanks for your help, as you can probably tell I am new to ODK!
Welcome to ODK! If you are using XLSForm or Build, it already
generates a unique instance ID at meta/instanceID.
Yaw
ยทยทยท
--
Need ODK consultants? Nafundi provides form design, server setup,
in-field training, and software development for ODK. Go to
https://nafundi.com to get started.
In order to create a guaranteed unique identifier for each instance of a
form, I propose to concatenate the device IMEI with the unix time derived
from the 'start' type date-time.
I realise I could just leave that date-time as a string (?) but it would be
ugly. I presume that I can parse the date-time string within ODK and
calculate unix time (I haven't yet looked at string parsing options) but
that will be uglier!
Is there a simple way to make this conversion?
Or is there a better/simpler way to make a unique identifier? There is
nothing else in my form that is certain to be present and unique.
Thanks for your help, as you can probably tell I am new to ODK!