Validation for multiple drill down questions | XM Community
Skip to main content

Hi!

I’m working with a block with 7 drill down questions with 3 groups (each one uses the same hierarchy of choices). I need apply validation to the responses in order to avoid duplicates in the set of responses from the 7 questions within the block.

Any ideas to achieve this?

 

Hello, 

Applying validation to prevent duplicates across a set of 7 drill-down questions in a single block requires a workaround, as there is no direct built-in setting for this specific uniqueness check.

 

Recommended Workarounds

 

You will need a combination of custom logic to enforce this:

  1. Use Embedded Data: Capture the selected value from each drill-down question into separate Embedded Data fields as the user progresses.

  2. Custom Validation Logic: Apply custom validation on each subsequent question. This validation should check the current answer against the piped values of the previously recorded Embedded Data fields to detect any duplicates.

  3. Enforcement Strategy:

    • Flow Control: Utilize Survey Flow with Branching or Re-display Logic to force the respondent to correct the answer if a duplicate is found.

    • Custom Code: For the best user experience, use JavaScript to validate in real-time and prevent the user from advancing until all seven responses are unique.

Achieving this requires breaking the validation logic into smaller, sequential rules that leverage Embedded Data to compare the current answer against all previous choices.