Mandatory response with custom logic based on a select_many question

Hi guys!

I’m having some issues trying to set a mandatory response with a custom logic based on a select_many question. It works if I select ONLY the specific answer that I set in the rule, but if I select that answer plus others answers, the rule doesn’t work.

Can you help me understand how I should set the rule?

In annex, some screenshot to explain better my problem.

Thanks in advance!

Chiara



Could you share the related part of your form, please?

For a select_multiple, you should use selected(…) not simple ${…} reference, see ODK XForms Specification.

All selected choice_names are stored in one string (the select_multiple variable) separated by one space and ordered as the choice_list.

1 Like

Here is my xls form. But I would like to use only the form builder, because my staff is still beginner and they don’t know xlsform at all.

@chiaramar, you seem to skip the question if the other is not selected in a previous select_multiple question. It’s a bit different than what you generally do for a select_one question (like what you have been doing). You could do this as discussed in our previous post:

We also have a support article User-Specified “Other” Responses for Multiple-Choice Questions for this which should help you understand how it is done.

Thanks @Kal_Lam !

1 Like