Repeat group based on condition

Hello, dear ODK community members!

I have faced this challenge when creating an ODK survey:

I first need to ask respondents on how many people live in their household, so I created a repeat group named group_listing which will include their names, sex, and relationship.

After I have listed all household members, I need to ask a few more questions about their age and whether or not they stayed at home in the last 7 days. For this, I have used indexed-repeat and calculate field in another repeat group group_details.

And after I have responses I need to ask questions only about those members of household who are 18 or older and those who have stayed at home in the last 7 days. So I again need a repeat group group_main_questions. I tried to add a condition ${eligible_age}>=18 and ${stay_or_no}='yes' to relevant on a group inside a third repeat. This kind of works: the odk form lets you ask only those people who match criteria, but for other members when I download data other members also appear in the list.

My question is: Is there any other better way of creating a repeat group based on a condition? So it only asks those people of household, who match criteria from previous repeat group?

I am using ODK collect v1.18.2

**Attached is my xls formtest 1.xls (24.5 KB)

Anyone can help? urgently need help

what do you mean by that?

I downloaded your form and it works well, Collect displays only questions for who are 18 or older and those who have stayed at home in the last 7 days.
Is your problem only with saved results? You said dowloaded... downloaded from Agregate?

Yes, indeed. When I download Excel sheet with responses from the aggregate, there will be empty rows for those respondents who did not match criteria.

Ahh I see. So answering your question:


alright, thank you for reply!