What is the problem? Please be detailed.
In a form being designed for a household level survey where 2 individuals have to be surveyed per household, a unique ID for each survey respondent (“respondent_id_number”) is generated using the “generate_respondent_id” function in the calculates sheet. Screenshots of the survey section sheet as well as the calculates sheet are below with relevant portions highlighted in yellow -
Survey section:
Calculates sheet:
When this calculated “respondent_id_number” is passed to a subform for recording the details about household members by including it in the model sheet of the sub-form, clicking “create new instance” of the subform fails to initialize and move forward. Instead, the app cycles back to the main menu with list of surveys/forms to pick from.
The queries sheet in the main form -
The model sheet of the main form -
The model sheet from the sub-form -
An explanation and/or fix would be very helpful.
What you have you tried to fix the problem?
This problem does not arise when “voter_id_number” which is an alpha-numeric user input value (not a calculated value like “respondent_id_number”) is passed to the sub-form through the model sheet. To check if the reason for the problem is somehow the contents of “respondent_id_number”, the “generate_respondent_id” function has been modified for debugging purposes to assign it the value of “voter_id_number” without any modifications. This may mean the issue has been isolated to passing calculated values to a sub-form.
What ODK tool and version are you using? And on what device and operating system version?
I’m using ODK 2.0 and Application Designer 2.1.0.