XLSform code to create Serial, Sequential number and lock it in

1. What is the problem? Be very detailed.
a. Surveyor serial number to display automatically in field and lock it on form
b.Household serial number to display automatically in field and lock it on form, no need for surveyor to type in number, so avoid wrong number when typing and gain more time for surveyor during data collection
c. Also Household member serial number to display automatically in field and lock it on form, no need for surveyor to type in number, so avoid wrong number when typing and gain more time for data collection
2. What app or server are you using and on what device and operating system? Include version numbers.
My project survey system is using server on https://kf.kobotoolbox.org/#/........ and client either ODK collect or web form https://ee.kobotoolbox.org/x/.....

3. What you have you tried to fix the problem?
We don't need surveyor to type in serial number of tree entities (Surveyor, household and household members) as I justified above. Serial number of each entity has to be generated and display in field automatically
4. What steps can we take to reproduce the problem?

  1. Surveyor just select his serial number automatically displayed in a combolist and his name is displayed automatically in next field
  2. Household serial number is generated automatically in next form section where he just type in the name and other household related-information
  3. Member serial number also displayed automatically in field of next session and surveyor jumps serial number and just type in the name and other household member related-information
  4. All serial numbers have to be locked not permitted to any modification.
    5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
    Please find attached the form with three auto serial number fields indicated by red arrows

Thanks for your support

Sequencial and Unique serial number xlsform code 2.docx (101.9 KB)

Since you are using Kobo, it might be best to ask at https://community.kobotoolbox.org because I'm not sure what they enable server-side.

Here's what you can do in ODK Collect.

  • You can have a list of all IDs/names/whatever in a form and have the enumerator pick one.
  • You can use a preloaded CSV where you enter some ID and you can pull data about that entity. That data can be read-only or read-write.
  • You can have a form automatically generate a UUID (36 characters). You can generate shorter IDs in other ways, but they will likely conflict.
  • You can generate sequential numbers with ODK Counter and link it to Collect.
  • You cannot pass information between forms automatically.