Custom validation based on answers to a prior survey question | XM Community
Skip to main content
I'm trying to create a custom validation based on a user's responses to an earlier survey question. The example is this. 1. I ask the person taking the survey his/her age, 2. I ask how many years they've been working in the current job. It's not possible to provide an answer to question #2 that's greater than the age provided in question #1, and I'd like to create a validation for that but don't know how. Arguably, it would be even more accurate to create a validation something like 16 years + the age provided in question #1 (given that most people don't take a first job until age 16), but that seems to be another layer of complexity, and I'm happy to validate to no greater than age as a first pass.
You use Piped Text to accomplish this.



Your custom validation will be set on your second question and it will look something like...

* Validation passes IF Q2 text entry is Less Than {piped text entry for Q1}.
That's what I had hoped to do, but the field for the piped text is merely a free text field and there is no user interface for me to choose piped text. Here's a screenshot with the fir right field as the item in question. !



To get around that, I tried going outside of the custom validation box and identify the piped text code through a different interface and then copy and paste that piped text code into the field on the far right of my custom validation screenshot, but it didn't work.



Any other suggestions?
I managed to get an answer from phone support. To close this out, the answer was that one needs to go outside of the custom validation box and copy the piped text from the previous answer, and then paste it into the last field of the custom validation box.
Correct. Qualtrics has a pretty good GUI, but a copy and paste is still a programmers best tool.

Leave a Reply