Choice filter based on multiple selection


I am trying to create a choice filter based on a multiple selection field.
The thing is when I select one option in the first question, the choices are filtered in the second but when I have multiple selections in the first question, I cannot see any option in the next one.
Please check attached XLSForm for more information.

ChoiceFilter.xls (31 KB)

Thank you

Hi @wrkadri

I think you need to use calculations, please try this edited form: ChoiceFilter.xls (11 KB)
is that what you expect?

Hello @wrkadri and @Grzesiek2010,

Looking at your file, It looks like an extract of yet a larger form, where I assume those won't be the only options, meaning the longer the list gets the longer the calculation.

If my assumption is correct, then maybe consider building an external .csv file with all the hierarchies and then use the search() function to retrieve your filters.

If my assumptions are wrong, and you actually have only two departments, then use if(count-selected(${dep})>1, base=${base}, base=${base} and dep=${dep}) which evaluates if all departments are needed or if one gets excluded and filtered to base

I didn't test, but it should work for you

Happy ODKing,
Jukes R