ODK getting household members with one unique ID

Hello dears,

I am struggling to design an ODK form to enter a household document number and get (pulldata) all members data (Name, Age, Gender..) who registered under this household document number. i. e. to put one ID number and bring any members registered under this ID. can anyone support me please with an example provided?

i am using ONA which is based on ODK.

Thanks a lot!

1 Like

Hi @rezhiar_kamal
welcome to the forum! Please introduce yourself here!

could you attach a sample form and your csv file? It's much easier to help when we have more data.

as I understand you have values like

ID Name
1 Adam
1 John
2 James
2 Peter

and for example you want to get Adam and John if the entered id is 1. Am I right?

What then? Do you want to use those values if select_one/select_multiple question or just display?

1 Like

Thanks a lot dear Grezesiek,

I will introduce myself for sure :slight_smile:
Yes, you are right with your example.
basically i want to create a form, this form is pre-loaded with a CSV file that contains ID=1 and Name= Adam and John associated with the ID. so in the form there's a text box input to type ID, so if user entered 1, the next text input pulldata the name of Adam, but the pull data should be dynamic to be able to pulldata of John name as well (to create two text box inputs, why text box? to allow the user to update the name). i hope i am clear now. thanks for your support in advance.

How many different ids do you want to support? Will that be something like 1-10 or 1-100?

1 Like

basically it depends on the family size of each households starting from 1 to maximum 20 members in each households, because the idea is all the family members are registered under one household document ID (could be only one member, could be 10-20 members) if the user typed household document ID, all the member names should be displayed in text-boxes to be updated.

Hmm it's not an easy case... I think it's not possible to use pulldata here as you wanted. What about a solution like this one: testq.xlsx (6.8 KB)
I used cascading selects to get values for each id, as far as I know it wouldn't be possible using pulldata because it returns just one row and you couldn't use duplicated keys (ids).

2 Likes