Adding custom validation across multiple questions within a block | XM Community
Skip to main content

I have a block of 12 questions. The order of the questions is randomised. For each question, participants are forced to select either 

upvote
downvote
, or 
pass
.
How can I force participants to select each of the possible options exactly 4 times across the 12 questions?
In other words, each participant must choose 4 questions to 
upvote
 and choose 4 other questions to 
downvote
.
My thinking is to have embedded data fields (e.g., 
upvoteCount
 and 
downvoteCount
), increment these data fields +1 each time the corresponding answer option is clicked, and to disable the next button for the block until these embedded data fields both equal 4. However I'm struggling to implement this.

Since the items all use the same scale, could you set up the questions in a Matrix, and apply Statement Randomization and Custom Validation to achieve this? In the Custom Validation, add conditions where Count Upvote = 4 and Count Downvote = 4.


https://community.qualtrics.com/XMcommunity/discussion/comment/55842#Comment_55842Yes, making it a matrix is a good idea. But while that helps me with the getting the validation to work, it makes the appearance of my survey much less attractive.
This is how it looks with separate multiple choice questions. Appearance is nice, but I can't figure out how to get the validation to work.
Screenshot 2023-02-27 at 15.55.04.pngAnd this is how it look with a single matrix question. Easy to get the validation to work with this, but the appearance is not so nice.
Screenshot 2023-02-27 at 15.49.26.pngMaybe there's a way to format the matrix so the first column with the statements can be much wider than the answer options?


If you hover your cursor over the first vertical line in the Matrix Table (the one between the statement and the Upvote column), you should be able to click and drag it to the right so the statement column is wider.
You might also consider putting the choices a drop-down list Answer Type.
Finally, if you prefer having the radio buttons and the line dragging solution above doesn't meet your expectations for appearance, there may be Javascript solutions for setting the column width in a Matrix that you can find in the Community.


Leave a Reply