How can we restrict total sum and disable the "go to Next" feature till the validation is correct | XM Community
Solved

How can we restrict total sum and disable the "go to Next" feature till the validation is correct

  • 5 April 2018
  • 2 replies
  • 14 views

In my survey, user has to fill in hours for different initiatives (as a constant sum) and the total hours should be less that the total available hours. The total available hours is an text with calculation via Piped text. I need to somehow restrict people to not over allocate hours and disable the next page if the same happens
icon

Best answer by LaurenK 24 July 2018, 17:44

View original

2 replies

Userlevel 7
Badge +13
Hey @Kohsheen! It looks like you reached out to our Support team regarding this inquiry! We would love it if you shared with the rest of the Community the answer you received in regards to using Custom Validation in conjunction with Math Operations!
Userlevel 7
Badge +13
It looks like our specialist provided the following custom validation solution:

If | Question | First answer choice | is | Less than or Equal to | $e{ [NUMBER YOU WANT AS MAX] - q://QID1/ChoiceNumericEntryValue/2 - q://QID1/ChoiceNumericEntryValue/3 - q://QID1/ChoiceNumericEntryValue/4 }
And | Question | First answer choice | is | Greater than or Equal to | $e{ [NUMBER YOU WANT AS MIN] - q://QID1/ChoiceNumericEntryValue/2 - q://QID1/ChoiceNumericEntryValue/3 - q://QID1/ChoiceNumericEntryValue/4 }

You will need to change out the QID's and add/subtract more or less ChoiceEntryValue piped texts, but otherwise it works great. Be sure to check recode values to make sure your piped text is grabbing the right values. As always, if others have questions about this setup, please feel free to contact our Support team!

Leave a Reply