How to disable Categorical : Multiselect choice on particular choice selected

I have question as show in the image
If I select DON’T KNOW then I should not be able to select any of the other options, How i can do this

Hello @raghu,
Well, you can add a validation in this question to trigger an error in the interview when the interviewer chooses I DON’T KNOW and any other option.
The validation could be like this:
!(self.Contains(CodeIDONTKNOW) && self.ContainsAny(CodesOtherOptions))

Another possible solution is to define the question as a single-choice question.

1 Like

You can’t. This was possible in a [very early] version of Survey Solutions, but was an oversight resulting in undesirable consequences. With the introduction of more rigorous check for circular referencing this has been eliminated: you can’t restrict the choice set based on the choice already made in that choice set. And it makes abundant sense.

What you need to realize is that the multiselect question is in fact a shortcut for a bunch of single-select questions:
Q4605a. Are you using complementary and alternative medicine because of its benefits? (Y/N)
Q4605b. Are you using complementary and alternative medicine because of it is safe? (Y/N)
Q4605c. Are you using complementary and alternative medicine because of a tradition/belief in it? (Y/N)

And this makes it apparent that “DON’T KNOW” doesn’t follow this pattern. If the person doesn’t know why using something, details don’t matter. So it becomes a gateway question:

Q4605_n1: Is there a particular reason(s) that you are using complementary and alternative medicine? Y/N
Q4605_n2 {if Q4605_n1=="YES"} What are these specific reasons (select all that apply):
  1. In practice we are usually not programming it this way as most people would probably know why they are using complementary and alternative medicine. An extra question would be a burden in a conversation. Thus a quick validation check like the one that Kevin is suggesting would pick up the mismatched combination.

If you decide to proceed that way, note that CodesOtherOptions is in fact a list of all the other choices besides DONTKNOW, which may be a long list (minor problem) or it could change from version to version of your questionnaire (bigger problem). There is a way to avoid both, that we usually discuss in the training and I’ll let you do the homework to think about how to avoid the enumeration of all the choices in your syntax.

  1. But in the situations when the “D/K” is having non-trivial probability such design makes sense.

  2. And when it is the most likely choice, it is even recommended, such as in the case:

Q1. What was the problem with your stay in our hotel?
a. price
b. noise
c. food
d. room service
x. no problem

Appears much better as:

Q1. Was there any particular problem(s) with your stay in our hotel? (Y/N)
Q2. {if Q1=="YES"} What was the specific problem or problems? 
(select all that apply):
a. price
b. noise
c. food
d. room service

Hope this helps, Sergiy

PS: Question Nr 4605?? Be careful with an interview of such a size: very few people will commit a week of their time to respond to a survey of 4600+ questions.

1 Like

Thanks Kevin,
That is very helpful to know , but the requirement was to disable the other choices when interviewer
selects the “DON"T KNOW”, since that is not possible as @sergiy has explained. I am planning to redesign this question will update further


Thanks @sergiy for the detailed view and suggestion, soon i will update my choice on this requirement.


Thanks @sergiy , We have decided to redesign this question as you suggested in note #3.