Survey question mandatory on condition

sunilsargam
Kilo Sage

if survey question is 'are you satisfied or not satisfied' 

and if use select Not Satisfied - then  "Give additional info" question comes which is mandatory

 

I want to show this question even if satisfied but in this case, it should be non mandatory.

 

Is this feasible in servicenow surveys

6 REPLIES 6

@Nilesh Pol 

It would be nice if you could share screenshots how that script is written, where etc it's written.

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

iftekharmir
Tera Guru

Hi @sunilsargam ,

 

Yes, this is feasible in ServiceNow surveys, and it can be handled using the configuration available on the survey question record (table: asmt_metric).

You can control both visibility and mandatory behavior using these fields:

Key fields to use

  • Displayed when → controls when the question is shown
  • Depends on → defines the parent question it relies on
  • Mandatory → controls whether the question is required

 How to achieve your requirement

  • Configure the “Give additional info” question to always be visible (or based on your condition using Displayed when)
  • Use Depends on to link it to the satisfaction question
  • Then control Mandatory based on the condition:
    • When answer = Not Satisfied → make it mandatory
    • When answer = Satisfied → keep it non-mandatory

Ankur Bawiskar
Tera Patron

@sunilsargam 

not possible to handle the mandatory logic dynamically

Only visibility can be controlled via "Depends on"

Workaround

-> create 2 identical questions

-> Q2 Depends on Question 1="Not Satisfied" and keep this Mandatory

-> Q3 Always visible (no dependency) and keep optional

Controlling Mandatory of Survey question based on other Survey question in same Survey 

💡 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

@sunilsargam 

Hope you are doing good.

Did my reply answer your question?

💡 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