Random selection a name from household roster

Dear Support Team,

Thank you for response. Maybe I could not make clear which i posted before…I will try to clear.

For example: I need to interview a girl who is between age of 18-25 from a household.

Suppose there are 3 girls between age of 18-25 the named AAA, BBB and CCC in the household.

I can build a household roster using “BEIGN REPEAT” command where I can input all family members.

Now I want to choose a girl for a complete individual interview either AAA or BBB or CCC by random
selection with appearance in text like “BBB” is selected (Suppose the “BBB” named girl is selected in random selection).

I mean I want to choose a random name from household roster with text appearance in next screen among of these three girls.

I hope now I can make clearer…could you please tell me about the process?

Dev Maharjan

1 Like

Hi Dev…

I was wondering if you ever got an answer to this question, or found the answer yourself. I am in a similar situation and will love your insight on this problem.

thanks a lot

This is a typical scenario that represents the traditional use of random selection from a household listing activity.

I would recommend the following steps to be able to get this done:

  1. Do a full household listing. I normally prefer not using repeat groups though. Essentially I would create a group of questions for each member and just name them with a suffix corresponding to the number of household member e.g name1 age1 gender1 name2 age2 gender2. I would set this to be upto a level like 40 depending on the most number of household that someone can have. In my example I have used 10. See a sample of the XLS form created for this

  2. I would then set a calculate question (my example is selectedmember) that will randomly select the selected respondent from the total number of household members (HHTotal in my example)

  3. You could then let the characteristics e.g. the name of the selected respondent be pulled from the list using if command as below. Note that due to how messy the formula may be when using repeat groups, I prefer creating a group for every member to help non-advanced users navigate.

if (${selectedmember}=1,${name1},(if (${selectedmember}=2,${name2},(if (${selectedmember}=3,${name3},(if (${selectedmember}=4,${name4},(if (${selectedmember}=5,${name5},(if (${selectedmember}=6,${name6},(if (${selectedmember}=7,${name7},(if (${selectedmember}=8,${name8},(if (${selectedmember}=9,${name9},(if (${selectedmember}=10,${name10},‘None’)))))))))))))))))))

This system will work both in KoboCollect and Enketo. A sample of the form in Enketo can be found here

Please feel free to customize the approach here in and share the same with other users


1 Like