Get consecutive id number in form before submission (or in offline mode)

Hi @wodbow, if you are going to be collecting data from a single device, you can increment an ID using the last-saved feature as follows:

survey

type name label default
integer id Client ID if(${last-saved#id} = ‘’, 1, ${last-saved#id} + 1)
text name What is your name?

Note that this will not increment the ID across multiple devices. This feature is also not yet available on the OCHA server until Enketo is upgrade next week:

1 Like