Drive Validation off of Total in Constant Sum | XM Community
Question

Drive Validation off of Total in Constant Sum

  • 29 August 2019
  • 8 replies
  • 48 views

Userlevel 5
Badge +9
  • Level 2 ●●
  • 45 replies
I am working on a form that the user can can choose to skip the question or stay within a certain range for what they enter.

They would need to enter a minimum of 12 yet no more than 48. It does not need to be a multiple of 12, just a minimum if they choose to order.
From what I have read in other discussions, I think I may need to use javascript, but that isn't my forte. I usually need a bit of help. I placed an image below to help visualize the question type.

!

Thanks!
Jen

8 replies

Userlevel 4
Badge +3
Can you use Custom Validation? It lets you use greater than/less than/etc logic: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/validation/#CustomValidation

So you could set the validation for each product field to "(If x>= 12 AND x<=48) OR (x=0)" (would use multiple logic sets)
Userlevel 5
Badge +9
> @KoalaTricks said:
> Can you use Custom Validation? It lets you use greater than/less than/etc logic: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/validation/#CustomValidation
>
> So you could set the validation for each product field to "(If x>= 12 AND x<=48) OR (x=0)" (would use multiple logic sets)
>
>

I don't think I explained my situation properly, now that I looked at it again. I used an example to make it simple, but that may have been a mistake.

My real question has 15 products and the range that is acceptable for the TOTAL is zero /OR/ anywhere between 12 and 144. I think my conditional logic needs to be based on the TOTAL AMOUNT.
Userlevel 5
Badge +9
I found a way to get my survey to move along. I am using embedded data to create the logic based off of the total sum. I create a branch if the number is not within the approved range that goes to an error statement (question) and then has them go back to the original question to fix their numbers. We will see how this works.
Userlevel 7
Badge +6
> @JenF said:
> I found a way to get my survey to move along. I am using embedded data to create the logic based off of the total sum. I create a branch if the number is not within the approved range that goes to an error statement (question) and then has them go back to the original question to fix their numbers. We will see how this works.

This solution is clunky, but outside of custom code, it is the only way I have been able to solve this problem to. it is really surprising that this sort of validation logic doesn't exist already.
Userlevel 5
Badge +9
> @Akdashboard said:
> > @JenF said:
> > I found a way to get my survey to move along. I am using embedded data to create the logic based off of the total sum. I create a branch if the number is not within the approved range that goes to an error statement (question) and then has them go back to the original question to fix their numbers. We will see how this works.
>
> This solution is clunky, but outside of custom code, it is the only way I have been able to solve this problem to. it is really surprising that this sort of validation logic doesn't exist already.

If you have access to the new product ideas area, you can upvote my suggestion that they create a solution for this. 🙂
Userlevel 7
Badge +27
@JenF,

You can do what you want with custom validation, a hidden question, and a bit of code. Add a text entry question below your constant sum and hide it with JS. Add an addOnPageSubmit function that copies the CS total to your hidden question input. Then base your CS custom validation on the hidden question value.

I was wondering about the new product idea area. I was invited and signed-up, but was never given access.
Userlevel 5
Badge +9
> @TomG said:
> @JenF,.
>
> I was wondering about the new product idea area. I was invited and signed-up, but was never given access.

Tom - Did you do the short survey they sent last week regarding the current product idea system? If you didn't do that, maybe reach out to Qualtrics. If you did do it, you should see an area on the categories called Product Ideas. That is where you will find the ideas that people are posting. Good Luck.
!
Userlevel 7
Badge +27
> @JenF said:
> Tom - Did you do the short survey they sent last week regarding the current product idea system? If you didn't do that, maybe reach out to Qualtrics. If you did do it, you should see an area on the categories called Product Ideas. That is where you will find the ideas that people are posting. Good Luck.
I completed the survey, but the category doesn't show up for me. I've contacted Qualtrics. Thanks for the heads up!

Leave a Reply