Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

How to make string field Mandatory when survey questions are answered?

deepikarama
Tera Contributor

I am trying to make a string field in a survey mandatory when a user selects Poor or Very Poor for any of the smiley-rating questions.

The survey contains four questions, each with a 5-point smiley rating. If the user selects Poor or Very Poor for any of these questions, the string field should become mandatory. Otherwise, the string field should remain visible but not mandatory.

 

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@deepikarama 

you can show/hide question based on previous survey question value

but you can't make it mandatory/non-mandatory based on previous question value

Approach

Create two-comment-fields : one comment question is shown only for low ratings and is mandatory, while the other is shown for non-low ratings and is optional

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Thanks for the response. We can proceed with two comment fields:

  • One comment field for low ratings (Poor and Very Poor), where the comment is mandatory.
  • Another comment field for non-low ratings, where the comment is optional.

As we have four questions with 5-smiley ratings and the Depends On condition allows us to select only one question/field 

 

Please let me know how to proceed with multiple questions. 

@deepikarama 

-> create separate low-rating comment questions tied to each rating question, plus one optional general comment field for normal ratings.

-> In other words, instead of one low-rating comment field depending on four questions, you create four mandatory low-rating comment fields, each dependent on one smiley question, because one dependency can point to only one source question

something like this

AnkurBawiskar_1-1783590398962.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader