Hey there -
Okay, so I have a matrix table that is constant sum. The total of the entire table (not just an individual row/column) needs to equal a value that the respondent gave earlier. I'd like to include some validation in the survey to make sure the values are equal, but it doesn't seem qualtrics has this included easily.
What I've come up with so far is
(1)Add a text/graphic question after the matrix table and have it calculate the sum of each cell in the matrix table using piped text - e${{option 1}+option 2...
(2) Have an error message pop up if this equation does NOT equal the earlier provided value. (Again, piped text).
My problem here is that the equation can't appear to be executed in page, unless I'm missing something. It says invalid expression if it's on the same page, but works fine if it's on the next page. This means I have to have an awkward page break and the error message on a second page. That's a bit harder for them to edit than if they could see the total from the the entire matrix being added up as they were working. It also means if there isn't an error message it's just a blank page (as it's the end of the block) because of the page break.
Any other ideas on how to make this a bit more user-friendly?
There is another set of Constant sum question type, which calculates total in real time and prompts if the total doesn't match what we need to. If that doesn't work or if you couldn't find this then you will need to add a JS on nextbutton click function to check the current total, for which you'll need to create a fake button with same properties as Next button then hide actual next button via display none function, variables and add the parseInt of them, then check if it matches, if it does click next button and if not prompt using validation classes.
Thanks for the response! But the constant sum doesn't allow for totalling over multiple rows/columns, unless I'm mistaken (which is why it's not what I used originally).
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.