I'm trying to code a survey where we ask for the names of up to 15 household members. We only want to ask questions about schooling for the oldest 5 children if there are more than 5.
Currently we have calculations that determine if the child is between 5 and 18. But so far I cant figure out how to limit the survey to the 5 oldest if there are more than 5 children in the household.
We currently are coding it using the hh roster ID but that potentially changes for each survey - depending on the order the enumerators enters the children.
I think I know how I can get it to "count" for only 5 entries - but not sure how to make those the 5 oldest.
Any tips and or suggestions.
Attached is an example. Note that in the real survey file the "Child" repeats 15 times.
Note that the XML file needs to be hand-edited after it is generated to
replace the <output...> directive that specifies the attendee's name with a
relative-path expression (line 94 of the file)
I have a number of extra text fields that could be changed to calculate
fields (and not displayed). The integer fields can be left as-is and the
prompts for them deleted from the XML file. Or you can replace them with
calculate fields and whenever you reference them wrap the reference in
int() to convert the string value to an integer value.
I'm trying to code a survey where we ask for the names of up to 15
household members. We only want to ask questions about schooling for the
oldest 5 children if there are more than 5.
Currently we have calculations that determine if the child is between 5
and 18. But so far I cant figure out how to limit the survey to the 5
oldest if there are more than 5 children in the household.
We currently are coding it using the hh roster ID but that potentially
changes for each survey - depending on the order the enumerators enters the
children.
I think I know how I can get it to "count" for only 5 entries - but not
sure how to make those the 5 oldest.
Any tips and or suggestions.
Attached is an example. Note that in the real survey file the "Child"
repeats 15 times.