How to add validation to a whole block | XM Community
Skip to main content

I have a list of options for respondents to choose from. The list is broken down into 3 separate questions for easier reporting, but is meant to look like a list with 3 sections to respondents. We would like to add validation so that no more than 3 options from the whole list, not just one of the sections, may be selected. Is there a way to add validation to the whole block?
Screen Shot 2023-02-05 at 12.58.20 PM.png

You can add them into just 1 question and use group to group them and give them a label. Then use validation to allow no more than 3 choices.


Hi ChelseaIC ,
You should be able to use Custom Validation with the "Selected Count" option, in separate Logic Sets for each possible combination, to achieve this. It would look something like:
If Q1 Selected Count is Equal to 3 and Q2 Selected Count is Equal to 0 and Q3 Selected Count is Equal to 0.
OR
If Q1 Selected Count is Equal to 2 and Q2 Selected Count is Equal to 1 and Q3 Selected Count is Equal to 0.
OR
If Q1 Selected Count is Equal to 2 and Q2 Selected Count is Equal to 0 and Q3 Selected Count is Equal to 1.
And so on...


https://community.qualtrics.com/XMcommunity/discussion/comment/55117#Comment_55117An easier way to do this is with one custom validation rule on the first question. Something like (use the actual QIDs of your 2nd and 3rd questions):
Q1 SelectedCount Is Less Than or Equal to $e{ 3 - q://QID2/SelectedChoicesCount - q://QID3/SelectedChoicesCount }


grahulp5 I was unaware that grouping multiple choice options was something that I could do - I wish I had realized that before I started getting responses. When I roll out this same survey next year, I will definitely do that. Thank you!
I was able to get the validation to work with TomG's suggestion. Thanks TomG and MatthewM for your help on this!


Leave a Reply