Please, I need help, I want to interview members of the household, they will first give their I will list their names and age. Later, I want my ODK form to randomly select a single person (if available) for each age category (under 5, 5-15 and over 15) and display his/her name for further questions. Consider the example below:
A household is occupied by 8 members of different ages. after listing their names and age, now I want my ODK form to select randomly a single member per each age group if they are available on the interviewed list 0-4, 5-15, or over 15 age categories. A total of three people or less who are going to answer further questions by "repeating groups" see the attached Register.xls (26.5 KB)
You can absolutely do this kind of thing with the ODK form specification! Unfortunately, XLSForm doesn't make that super obvious but you can write XPath expressions within an XLSForm.
This form shows an example that you can hopefully follow to get to your desired behavior. I used XPath syntax where necessary for filtering and XLSForm's compact ${} syntax elsewhere. I hope it's clear enough that you can pattern match without necessarily understanding all the details.
Yes sorry, I shouldn't have broken my rule which is answer if you know a solution and wait for other users if you just want to say sorry it's not possible.
If the selected respondent has more than one name, how do I make it pick all the names. For example I have a selected reposndent whose name is Randy Shaw. However is giving me only Shaw instead of Randy Shaw. How do I sort this?
Thanks
Xiphware, you very right. I had told someone that over 90% of what you think in an Xform is possible.
Struggled with a code and at the got it to work by just replacing or with and.
I have a similar problem to the one discussed here and wanted to get some help to see what I am missing.
How can I make ODK randomly select 40 numbers without replacement between 1 and N, where N is an integer inputted by the user in a previous question.
More specifically, in question 1, we ask for the number of households in the village. Following this question, I would like insert a 'calculation question' that will randomly select 40 numbers without replacement between 1 to N, where N is the total number of households.