if a rating of very dissatisfied or dissatisfied is given, we would like comments to be mandatory. | XM Community
Skip to main content

Hello Community,

I need to “if a rating of very dissatisfied or dissatisfied is given, in a specific question eg. #8 we would like comments to be mandatory.”. I have tried the following steps.

1. Set Up Embedded Data for Tracking:
• Go to the Survey Flow.
• Add an Embedded Data field (name it something like NegativeRating).
• Set its value as 0 by default.
2. Add Branch Logic in the Survey Flow:
• Right after Question 8, add a new Branch in the Survey Flow.
• Set the branch condition so it checks if the respondent selected “Very Dissatisfied” or “Dissatisfied” for Question 8.
• Inside this branch, set the NegativeRating Embedded Data field to 1.
3. Apply Display Logic to the Comment Field:
• Go to the comment field at the end of the survey.
• Set Display Logic so the comment field only appears if NegativeRating is equal to 1.
4. Make the Comment Field Mandatory:
• Click on the gear icon for the comment field and select Force Response.

This way, the comment field will be required only when a respondent selects a negative rating in Question 8.
This setup ensures that the comment field at the end of the survey becomes mandatory only for those who rated negatively in Question 8.


The above steps are working correctly
 

But 2nd part is that we need the comment field to be available but not mandatory when the selection is “Satisfied” or “Very Satisfied” (the NegativeRating is equal to 0) in Question 8.

Perhaps you can create another text entry question that doesn’t have force requirements that is displayed when NegativeRating = 0.

Then, in the Data & Analysis tab, create a field using the “Field editor” that combines these two questions.


@AditiK Your Display Logic will not help, it’s decided of question display while Mandatory is a form of Validation. So just remove the logic, show the question to everyone but in the question, set up custom validation like this picture

So there 3 case for you to pass:

  1. Comment not empty & Q1 very dissatisfied
  2. Comment not empty & Q1 dissatisfied
  3. Q1 satisfied or very satisfied or neither…

That will give you what you want, for more info, check this Response Requirements & Validation


@AditiK Your Display Logic will not help, it’s decided of question display while Mandatory is a form of Validation. So just remove the logic, show the question to everyone but in the question, set up custom validation like this picture

So there 3 case for you to pass:

  1. Comment not empty & Q1 very dissatisfied
  2. Comment not empty & Q1 dissatisfied
  3. Q1 satisfied or very satisfied or neither…

That will give you what you want, for more info, check this Response Requirements & Validation

@Nam Nguyen , thanks for this detailed explanation with visuals! 

 

@AditiK, can you confirm that it worked so I may mark it as ‘Best Answer’?


Leave a Reply