Populating multiple choice questions with dynamic values - Trouble with choice filter

Hi all,

Interesting one for you here.

I’m trying to design a survey with an initial repeat group where the respondent lists the name, age, and gender of all their family members.

I want these names to populate several multiple choice questions later on in the survey.

To do this, I use 20 “dummy” names that get populated by the choices entered in the first repeat. I use an indexed-repeat to pull the data. This works fine, however it means that at each multiple choice there are several “blank” choices which is unacceptable.

My next step was to use a choice filter to narrow the list down to a number of choices that correspond to the number of repeats, or family members, using calculate position. For some reason, when I implement the choice filter, the labels of the choices suddenly disappear.

It’s driving me insane trying to understand why this happens. Funny thing is, I swear I have done this process in the past successfully!

Here is my form

Any help would be much appreciated!

Hi
Do you have the form that you have so far created? Do you have the form that worked previously? Share either of these forms and it will make it easy for someone to fully assess
Stephane

Hi Stephane,

Thank you for replying. I wasn’t able to upload the form (too new!) so I hyperlinked to a google sheet (you can see it above).

Best,
Steve

Hi
My first look at it, i would recommend that you add a relevant section for each of the pname1 to 20. You can use
for pname1 use ${hhsize}>0 ,
for pname2 use ${hhsize}>1 etc

Try this and it should sort the issue of the blank

Regards
Stephane

Hello @stephanealoo
I have the same needs, reason why I made a copy of @sjed form, also did what you sugested, including the reveletant section, but the multiselect option is not showing any of previously names, it is just showing a box withouth any name.

Hi @danmarcelin,

Welcome to the community! Would you mind sharing with us a dummy of what you wish to do. Preferably in a pictorial form so that it would be easy to understand and see if it’s doable in KoBoToolbox.

Have a great day!

Hey all,

I have the same issue with choice_filter column, where previously was working well, as to populate only the choices that matches the condition,

but i think since the last update the form stopped suddenly and the kobo doesn’t read the formula well,

any solution ?

Hello Kal_Lam,
Thanks for the quick response.
Here you have the form xls file https://drive.google.com/open?id=1gQROviOyIaR_jMJLsT2tpRq1xx0tjRRZ.
Thanks in advance.

1 Like

Hi @danmarcelin,

Maybe you could simple do it as outlined in the image below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:
Image 2

Data entry screen as seen in Enketo: When there is no disability within the household

Data entry screen as seen in Enketo: When there is disability within the household

Reference xlsform:
Household (Index) Repeat Example.xlsx (27.7 KB)

Have a great day!