Show family members that are 15+ in a multiple selection question

  • The user enters the number of family members.
  • The user enters the name of each family member (repeat)
  • The user enters gender and age of each family member (repeat)

in the multiple selection question m2_q3, I want to list only the members who are 15+ of age . How can this be done?

Members_Testing.xlsx (10.0 KB)

Hi @newuser162! As you are new to the community, when you get a chance, please introduce yourself here.

I’d also encourage you to add a real picture as your avatar because it helps build community!

For your question, this is definitely doable! Once you have entered the roster, you can then do a query to find only the members who are 15+ and use that as the values list for your select multiple.

We do something similar here, where we collect name, age, sex, etc. in a first form:
quest1_03_0.xlsx (56.7 KB)

and then in a second form we have queries to identify mother or father, etc.
quest1_03_0_update.xlsx (56.4 KB)

You can see in the queries tab how we use “selection” to show the list of opposite-sex individuals, for example, in roster_spouse. You can do something similar with your variable for age being >=15. Note you will need to make sure to also use the household identifier – for my example it is q100 – to make sure that you have only members of the same household.

@elmps2018 Thank you for your reply! But it seems to me this is the first time I see such templates and queries when working with ODK. is this a new version?

1 Like

Hi @newuser162! Are you asking about ODK or ODK-X? They are different. For ODK questions, see https://forum.getodk.org/

I was actually asking about ODK, and after going to ODK forums I found out that what I’m trying to do is not possible using ODK.
What you showed though seems very interesting and provides more flexibility when designing complex household surveys.
Which makes me think I should switch to ODK-X instead of ODK when designing this particular survey.
I have 2 questions:
Are there any online tutorials, like videos maybe, to learn ODK-X?
How easy is it to integrate ODK-X with an online database or API?

1 Like

Here is our youtube channel

ODK-X sync-endpoint has an API you can access the data, though you have to understand the protocol which is more complicated as it maintains data synchronization. However, if you are simply pulling rows not editing them, it’s much simpler. Check out Suitcase to see a simple download of the data.

1 Like