PGR each group contains AND custom validation | XM Community
Skip to main content
Question

PGR each group contains AND custom validation

  • December 10, 2025
  • 4 replies
  • 33 views

Forum|alt.badge.img+4

Hello,

I’m using a Pick Group Rank question for 9 possible options across 3 groups. Respondents need to pick 1 option for each group. The validation is set for each group to contain a minimum and maximum of 1. All of that works fine.

But I ALSO want to add a custom validation so if the respondent chooses a specific option, they get an error message (that option is sold out). I know I can just remove that option or use display logic to prevent it being displayed at all, but I want that option to remain on the list and for the validation to fail if it’s selected. I can’t figure out how to add that custom validation on top of the “each group contains” validation. The Qualtrics interface really makes it seem like one or the other.

Appreciate any guidance you may have!

4 replies

vgayraud
QPN Level 7 ●●●●●●●
Forum|alt.badge.img+59
  • QPN Level 7 ●●●●●●●
  • December 10, 2025

Hi,

You could theoretically use a custom validation with logic sets with a structure like this (assuming OPTION9 is the sold out choice):

OPTION1A AND NOT OPTION2A ... AND NOT OPTION8A
OR
NOT OPTION1A AND OPTION2A ... AND NOT OPTION8A
OR
...
NOT OPTION1C ... AND OPTION8A
AND
NOT OPTION9A AND NOT OPTION9B AND NOT OPTION9C

That would be relatively painful to set up manually, and I’m not sure the platform even allows for that number of conditions.

The easier way would be to set the validation to min-max 1 for each group like you already are but add a custom script that would listen for events on your sold out option (probably click or dragstart), pop out an alert or display a message when triggered, and prevent it to be dragged.


Forum|alt.badge.img+4
  • Author
  • Level 1 ●
  • December 10, 2025

Hey Vincent,

Thanks for the quick response! I had wondered if I could do something along the lines you suggested with the custom validation, but the endless permutations gave me pause.

Your custom script idea that prevents the option from even being selected would actually be preferable to a failed validation, but I’m such a novice with JS that I wouldn’t know where to start.

Thanks again!


vgayraud
QPN Level 7 ●●●●●●●
Forum|alt.badge.img+59
  • QPN Level 7 ●●●●●●●
  • December 12, 2025

Hi Brian,

Maybe I can help, are you using the New Survey Taking Experience or one of the legacy layouts?


  • Level 4 ●●●●
  • December 12, 2025

Hello,

I’m using a Pick Group Rank question for 9 possible options across 3 groups. Respondents need to pick 1 option for each group. The validation is set for each group to contain a minimum and maximum of 1. All of that works fine.

But I ALSO want to add a custom validation so if the respondent chooses a specific option, they get an error message (that option is sold out). I know I can just remove that option or use display logic to prevent it being displayed at all, but I want that option to remain on the list and for the validation to fail if it’s selected. I can’t figure out how to add that custom validation on top of the “each group contains” validation. The Qualtrics interface really makes it seem like one or the other.

Appreciate any guidance you may have!

If you need alert or something right after the selection, then you need to use custom validation using JS. Qualtrics validation will do only after the respondent hit the next button or tries to move forward.