Multi-select filtering using roster information

Hi,

I have a multi-select question linked to the household member list question (“names”). On the other hand, I have a roster where each household member indicates their age.

I don’t know how to filter the choices in the multiple choice question by an age criterion. For example, that only the names of those over 14 years of age appear.

Thanks

1 Like

Hi,

Just point your multi-select question to the roster instead of the list question.
You can then use the questions (variables) in the roster (like age) in your filter.

Klaus

1 Like

This is a textbook case. See examples in section “Filtering in linked questions” of “Public example User questions and common patterns” here.

1 Like

Hi thanks for this, but now I’m having another problem: I’ve pointed the Multi-select question to the Household Roster, and given the condition age >= 15, which works and the list of options only shows HH members aged >= 15. In this question, I’m asking to select all HH members aged >=15, who are involved in economic activity. But, I now want to populate a new member roster based on the members selected in this multi-select question, i.e. only members aged >=15 who are involved in economic activity.
But I can’t find this question listed when I try to select it as source for my roster.

Alternatively, I was allowing the roster to list only the members aged >=15, then I was individually asking within each new roster whether they are involved in economic activity. I just wanted a shortcut for this, using the former method. Can someone help?

r1 is my initial Household Roster;
s1_5 is the age variable;
r6_alt is the multi-select question where I’ve listed the HH members aged >= 15, and where I’ve asked the user to select only those members involved in economic activity.

I’m trying the following enabling condition in the follow-up roster, which should list only the members selected in the multi-select question above (i.e. those who are aged >= 15 and also involved in economic activity). I cannot get this to work

r1.Any(x=>s1_5 >= 15) && r6_alt.Contains(@rowcode)

Where is your economic activity question located?
If it is inside the same roster r1 you can use it together with age in your filter.
If it is inside another roster but which also refers to the same list question as r1, it will also work.

Hi, the economic activity question is not actually listed. Rather, I am selecting it as a Yes/No from the multi-select question “r6_alt”. So the multi-select “r6_alt” question is listing all HH members from the “r1” roster who are aged >=15, and in that same “r6_alt” question, I’m asking to select all members who are engaged in economic activity.
Then in a following new roster, let’s say “roster_7”, I want to show only the members who have been selected in “r6_alt”. But I can’t get it to work.

I see. Okay, point roster_7 to the original List question (will select everything).
Add an enabling condition for the roster:

r6_alt.Count(x => x[0]==@rowcode) >0

and it will only show roster lines for the ones selected in r6_alt.

1 Like

Superb! This worked perfectly! Thank you so much!