How to add multiple constraints (none and declined to answer) for multiple choice question

A multiple choice question requires two constraints:

  • Not possible to select “None of the above” and any other option
  • Not possible to select “Decline to answer” and any other option

For single constraints I would use not(selected(.,‘none_of_the_above’) and count-selected(.) >1) but how to add the second constraint? using AND did not work…

1 Like

You could do the same 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 a condition is met)

Data entry screen as seen in Enketo: (when a condition is not met)

Data entry screen as seen in Enketo: (when a condition is not met)

Data entry screen as seen in Enketo: (when a condition is not met)

Data entry screen as seen in Enketo: (when a condition is met)

Data entry screen as seen in Enketo: (when a condition is met)

Reference xlsform:

Constraint.xlsx (12.6 KB)

2 Likes

Perfect, thanks Kal!

1 Like

Thank you a lot Kal I really appreciate your help

1 Like