Change Request Variable True

MK21
Tera Contributor

Hi All,

 

I have a requirement in Change Request form, in the category field below are the choices, when we select the below choices , another varible called CMDB checkbox, automatically it needs to checked , how to acheive this 

 

Decommission - Application
Decommission - Application & Server
Decommission - In Build or Non operational CI 
Decommission Server
System / OS upgrade
Tech Refresh / Server Migration
Project go-live

1 ACCEPTED SOLUTION

SunilKumar_P
Giga Sage

Hi @MK21, you can also try the onChange client script on category field.

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }

    if (newValue == 'Decommission - Application' || newValue == 'Decommission - In Build or Non operational CI' || newValue == 'Decommission Server' || newValue == 'System / OS upgrade' || newValue == 'Tech Refresh / Server Migration' || newValue == 'Project go-live') {
        g_form.setValue('cmdb', true);
    } else {
        g_form.setValue('cmdb', false);
    }

}

 

Regards,
Sunil

View solution in original post

12 REPLIES 12

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @MK21 

 

You can do via UI policy. 

 

LearnNGrowAtul_0-1707743336299.png

 

You can use script as well, to make it visible or UI Policy action.

*************************************************************************************************************
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]

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

If I am selecting category choices cmdb variable needs to automatically checked 

 

can I get this is via hi policy 

Hi @MK21 

 

In this case use UI policy script and then set value to another field.

*************************************************************************************************************
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]

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

Can you please provide the sample script