Custom Validation using piped answer : Multiple choice | XM Community
Skip to main content
Solved

Custom Validation using piped answer : Multiple choice

  • August 11, 2025
  • 3 replies
  • 33 views

Forum|alt.badge.img+1

Hi, I have not used Javascript before and would like to find out if it is possible to get around the problem without using JS. I have a series of multiple choice questions (2 attached in the example). I need the value of the second question to be less than the value of the first question to validate. (The idea being that you can’t get an undergrad without a high school degree, so likelihood of UG can’t be higher than high school). I can’t get custom validation to use the coded values of the options to set up the logical validation. 

Best answer by TomG

Since you can’t use recodes in a MC custom validation, on the second question you can OR logic sets where each set is an AND of a valid HS/Undergrad combination

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • Answer
  • August 11, 2025

Since you can’t use recodes in a MC custom validation, on the second question you can OR logic sets where each set is an AND of a valid HS/Undergrad combination


Forum|alt.badge.img+1
  • Author
  • 1 reply
  • August 11, 2025

Thank you, that works. But would you know if there is a less clunky way of doing it than writing 11 OR conditions?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • August 11, 2025

Thank you, that works. But would you know if there is a less clunky way of doing it than writing 11 OR conditions?

Not without JS, and even with JS “less clunky” would be in the eye of the beholder.