Serialize a questionnaires!

Hi to everybody,

How to serialize the questionnaires, so every questionnaire must be with a
unique serial id ex 1001,1002 etc?

Truly sequential numbers are impractical. That would require coordination
among all the ODK Collect devices and continual contact with a central
server to accomplish that.

Unique serial numbers can be achieved with 'UUIDs' which are not
particularly user-friendly (being very large random numbers) but are used
internally in many computer systems for unique identifiers. This is what
the default calculate uses for the 'instanceID' metadata field, which is
the unique identifier for a submission.

If you need something that is roughly sequential, you could use the preload
parameters to set the startTime of a form, then reformat that into a string
(e..g, 20130401145304) and just deal with gaps in the sequence. Note that
if you did this, you could have the same number used on several different
phones, so you might want to prefix these with the device id or e-mail name
used on the device to ensure uniqueness.

Some of this is covered in
http://opendatakit.org/help/form-design/binding/and at the bottom of
http://opendatakit.org/help/form-design/examples/

Otherwise, if you want more tractable sequential numbers, you would need to
allocate a different range of sequential numbers to each of your devices.
Then write your own app that could be called to obtain the next sequential
number from that assigned list. The ODK Collect form could then use the
"String from 3rd party app" or "Integer from 3rd party app" mechanisms to
call your app and obtain the next serial number in the list. See

ยทยทยท On Mon, Apr 1, 2013 at 6:17 AM, Elvis wrote:

Hi to everybody,

How to serialize the questionnaires, so every questionnaire must be with a
unique serial id ex 1001,1002 etc?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com