yes or no

Basina Akash
Tera Contributor

How to auto populate  yes or no question type based on another variable by using client script 

10 REPLIES 10

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
You can set the value as "yes" or "no".

 

 


Thanks and Regards,

Saurabh Gupta

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Basina Akash 

 

Why not use the UI policy to hide and show, instead of client script?

 

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Basina Akash
Tera Contributor

that is not working i have tried

 

 

 if (newValue == '1') {
        g_form.setValue('eods_required', false);
        alert('EODS false');
    } else if (newValue == '2' || newValue == '3') {
        g_form.setValue('eods_required', true);
        alert('EODS true');
    } else {
        g_form.clearOptions('eods_required');
        alert('EODS clear ');
    }

 

 

Hi @Basina Akash 

 

I will still recommend, try UI Policy if on native view or portal use Catalog UI Policy. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************