Screenshot: Custom validation panel in Qualtrics for the IM name generator question

Setting up custom validation on the IM name generator to prevent duplicate entries

The survey prompts say, "enter names that you have not listed before," but there could be cases in which respondents list duplicate names. In order to prevent this, we can set up a validation logic that only allows unique answers for each name generator field.

1

Go back to the IM generator question, and toggle "Add validation" on the left.

2

Click "Custom validation."

3

Set up the validation logic for the IM generator (Q1_NG_IM1).

The purpose of this validation function is to make sure the value of every field in this generator is either (a) empty or (b) is not equal to other fields available in the generator. Therefore, the logic should look as follows:

Logic level 1
(between logic)
Logic level 2
(within logic)
Type Name Field Name Condition Type Condition Value
AndQuestionQ1_NG_IM11Is Not Equal to${q://QID1/ChoiceTextEntryValue/2}
OrQuestionQ1_NG_IM11Is Empty
AndQuestionQ1_NG_IM11Is Not Equal to${q://QID1/ChoiceTextEntryValue/3}
OrQuestionQ1_NG_IM11Is Empty
AndQuestionQ1_NG_IM11Is Not Equal to${q://QID1/ChoiceTextEntryValue/4}
OrQuestionQ1_NG_IM11Is Empty
… (continued for all field pairs) …
AndQuestionQ1_NG_IM18Is Not Equal to${q://QID1/ChoiceTextEntryValue/9}
OrQuestionQ1_NG_IM18Is Empty
AndQuestionQ1_NG_IM18Is Not Equal to${q://QID1/ChoiceTextEntryValue/10}
OrQuestionQ1_NG_IM18Is Empty
AndQuestionQ1_NG_IM19Is Not Equal to${q://QID1/ChoiceTextEntryValue/10}
OrQuestionQ1_NG_IM19Is Empty
4

Go to the AC name generator (Q2_NG_AC1). Set up validation logic there as well.

Here, we want to make sure the value of every field in this generator is either (a) empty or (b) is not equal to other fields available in the generator and (c) is not equal to other fields available in the previous generator (Q1_NG_IM1). Therefore, the logic should look as follows:

Logic level 1
(between logic)
Logic level 2
(within logic)
Type Name Field Name Condition Type Condition Value
AndQuestionQ2_NG_AC11Is Not Equal to${q://QID2/ChoiceTextEntryValue/2}
OrQuestionQ2_NG_AC11Is Empty
AndQuestionQ2_NG_AC11Is Not Equal to${q://QID2/ChoiceTextEntryValue/3}
OrQuestionQ2_NG_AC11Is Empty
… (continued for all AC-to-AC field pairs) …
AndQuestionQ2_NG_AC19Is Not Equal to${q://QID2/ChoiceTextEntryValue/10}
OrQuestionQ2_NG_AC19Is Empty
AndQuestionQ2_NG_AC11Is Not Equal to${q://QID1/ChoiceTextEntryValue/1}
OrQuestionQ2_NG_AC11Is Empty
AndQuestionQ2_NG_AC11Is Not Equal to${q://QID1/ChoiceTextEntryValue/2}
OrQuestionQ2_NG_AC11Is Empty
… (continued for all AC-to-IM field pairs) …
AndQuestionQ2_NG_AC11Is Not Equal to${q://QID1/ChoiceTextEntryValue/10}
OrQuestionQ2_NG_AC11Is Empty
AndQuestionQ2_NG_AC12Is Not Equal to${q://QID1/ChoiceTextEntryValue/1}
OrQuestionQ2_NG_AC12Is Empty
… (continued for all remaining AC field × IM field pairs) …
AndQuestionQ2_NG_AC110Is Not Equal to${q://QID1/ChoiceTextEntryValue/10}
OrQuestionQ2_NG_AC110Is Empty