Validation based on count of responses to several multiple choice questions | XM Community
Skip to main content

I have several multiple choice questions on a page. I have them in column layout (3 columns) rather than the default vertical layout. Is there a way to do validation/ stop a respondent progressing if they tick more than say 5 responses across the various multiple choice questions on the page?
n.b. there is display logic on each multiple choice question, so if I merged all the multiple choice questions into one question, then I'd need to add display logic on all of the options. Also, there are a lot of options, so I am using the column layout (3 columns) rather than the default vertical layout. I believe you can only use groups with the vertical layout.

MikeW
You can do this via custom coding rather than by custom validation where you can find the number of choices selected real time.Post which you can disable the other options if it is greater then 5.
Apply the same code in all your multiple choice questions.
Qualtrics can also provide you the selected choices count but it would be post the next button click/ post block is completed not relevant to your use case. You can use an embedded data with the value something like this ${q://QID368/ChoiceGroup/SelectedChoices}. Change the QID as required if you want to trigger a warning at the later stage.
Hope it helps!


MikeW,
You can do it with Custom Validation on the first question something like:
Q1 Selected Count Is Less Than or Equal to $e{ 5 - ( q://QID2/SelectedChoicesCount + q://QID3/SelectedChoicesCount ) }
BTW, you might be interested in the mcColumns function. It is a much more flexible way to do columns and it supports choice groups.


https://community.qualtrics.com/XMcommunity/discussion/comment/52392#Comment_52392Thanks TomG - I'll check it out


https://community.qualtrics.com/XMcommunity/discussion/comment/52392#Comment_52392Hi TomG - please can I check. Does this approach work if the questions are within a loop & merge block?


https://community.qualtrics.com/XMcommunity/discussion/comment/52398#Comment_52398I think so, but haven’t tried it.


https://community.qualtrics.com/XMcommunity/discussion/comment/52403#Comment_52403Thanks. It does work.


Leave a Reply