Constant sum validation: must total + custom validation
Hi all,
I have a constant sum question, and I would like validation to depend on two things:
1. The total must equal a value entered in the previous question
2. If a value has been entered for the “other maths” line, then the text box on that line must not be empty.
!
I can do (1) with piped text, using the “must total” validation option, or I can do (2) using custom validation. However, I can’t seem to do both at once. The custom validation option doesn’t seem to have the ability to do anything with the total.
Does anyone know how to achieve this?
Page 1 / 1
On your "Other maths" choice, click on the down arrow and select Text Entry Validation/Force Response.
Thank you! I can't believe I didn't try that I assumed it would force a response regardless, but obviously didn't give it a go. Thanks again.
Hi Yvonna, were you ever able to come up with a solution for your first question (validating a total in a Constant Sum question with a response to a previous question? Thanks so much!
Hiya,
No, not really. I ended up piping the answer from the previous question into the question text and saying that their total for the current question should equal that. Not perfect, but I got fewer invalid responses with the text reminder than without it.
Thanks for the input, I ended up doing the same!
I came across this while trying to find a parallel to a different problem I have. Instead of using the Constant Sum question type, have you tried setting this up in a Matrix question type with a single column, and selecting Constant Sum under the Matrix Type options? You can then select "Must Total" Validation Type and pipe the value you're trying to match from the previous question in the "Choices Must Total" field.
!
!
Is it even possible to use piped text as the total in validation for either the Constant Sum or Matrix-Constant Sum Question types? I’ve seen it referenced above for @Yvonna’s initial question and @MatthewM’s later suggestion of using the Constant Sum Matrix instead. I’ve been trying both and it’s not working at all.
For context, I have a numeric amount saved to an embedded variable (classified as number set). The validation doesn’t work if I enter an amount below the value (e.g., if the variable is set to 10 earlier in the survey, my constant sum adds up to 3, but I’m able to submit the survey without any validation kickback).
Is it even possible to use piped text as the total in validation for either the Constant Sum or Matrix-Constant Sum Question types? I’ve seen it referenced above for @Yvonna’s initial question and @MatthewM’s later suggestion of using the Constant Sum Matrix instead. I’ve been trying both and it’s not working at all.
For context, I have a numeric amount saved to an embedded variable (classified as number set). The validation doesn’t work if I enter an amount below the value (e.g., if the variable is set to 10 earlier in the survey, my constant sum adds up to 3, but I’m able to submit the survey without any validation kickback).
It definitely works for me in a Matrix Table-Constant Sum type question, but I have only piped in values from other questions on the same survey; I’ve never tried piping in the value from an Embedded Data field into the Must Total field.
Here are a couple of things to look into and rule out, if you haven’t already, and a couple of things to experiment with:
Make sure that the Embedded Data field appears before this question in the Survey Flow.
Make sure that the value is being written to the Embedded Data field as expected.
Try classifying the field as a number instead of number set.
Try renaming the field so it does not contain a space.