How to make string field Mandatory when survey questions are answered?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
-> 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
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader