Choice filter with multiple selection

is there any idea to filter choices based previous question and both of them in multiple selection type in xlsforms


Hi @Moteb_Marei

I have two sample forms that use choice filter so I'm sure it's exactly what you need:
choicefilter1.xlsx (7.2 KB)
choicefilter2.xlsx (8.8 KB)


Thanks very much it helps me a lot

Hi @Grzesiek2010, i have a similar problem, i need choice one answer filter with one or more previous answers

Did you try sample forms I attached?

I need that after selecting multiple values from "kind" the options available for movies are filtered, joining the multiple values of movies corresponding to each selected kind , for example:

Kind= k1,k2 then movies={m1,m2,m5}
Kind=k3 then movies={m3,m4,m5}

testForm.xlsx (11.6 KB)

in a repeat!!!

testForm.xlsx (12.1 KB)

In your case this sample could help: fridah.xlsx (8.8 KB)

1 Like

Hi, Im trying to achieve the same thing and tried your code but it doesn't show up the movie names on selection of the kind. Some variable is missing in the code. Please rerun the code and see if you can fix the same and share with us again.


Which form did you try?
If testForm.xlsx (7.2 KB) it works as expected.
What tool do you use?

Hi @Grzesiek2010,

I am writing a household level survey and I am facing a problem similar to the one discussed here. However, I have tried the different forms you suggested and they do not apply to my problem. Could you maybe be able to help me?

At the beginning of my survey, I ask for the household member's names. I then ask questions such as "Who is the household head?" where the person has to select one of individual's name. However, apart from the individual's names, there are a number of blank rows that can be selected.

I have tried adding the choice_filter option but this just crashes my ODK collect when it gets to that question.

Do you know what would be the best solution for this? I have attached a snippet of my xls form for your reference :slight_smile:
ODK_example_multiple_selection_blank.xlsx (20.5 KB)

Thank you very much, any help is very appreciated it!



1 Like

Hey @Olimpia, Simply try to use relevant column with count-selected() being > 0 up to 14 then no more blank rows will show up.

Thanks a lot. This post has helped me so much.