Choices filter - by expression in choices sheet

we try to filter a second list by the choices of the first one, using selected(…) expression in then choices sheet.
It seems, as if expression is not working here and just a text interpretation might happen here, like boolean(:'x:). See attached file:
Dynamic Choices - with Expression 02.xlsx|attachment (12.4 KB)
Are we doing something wrong? (@Kal_Lam)

There was another smart solution for the request, see


Hi @wroos,

Could you share with us your xlsform (with the choice filter question on it) so that we could have a look at if for you.


Dear Kai,
sorry, attached in post had bad link.
Dynamic Choices - with Expression 02.xlsx (12.4 KB)

It seems as anything in ChoiceFilter columns in choices sheet is only treated as string literal (i.e. no functions or ${} reference working).


Hi @wroos,

You could do the same as shown in the image below:

In the survey tab of the xlsform:

In the choices tab of the xlsform:

Reference xlsform:
Dynamic Choices Filter.xlsx (12.5 KB)

1 Like

Dear Kai,
thank you very much.! Yes, this works, we have tried it before the posting, as cited above.
But we did not understand, why our approach doesn’t work. Would be great, if you try to explain it with the our xls (attached before).

My feeling is that the MyChoiceFilter column in the CHOICES sheet is only treated as text literal by KoBo. That means that you NEVER can use there something like ${var} there, neither any function.
Could you confirm this, please? (We did not find a hint on this restriction in the community discussion or in ODK/XLS/XForm manuals so far.)
Kind regards

1 Like