We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

How to set default value on fields only for normal change form?

Aryan
Tera Contributor

Hello All,

 

We have a requirement where we have to set default value in description, short descript etc fields only for Normal change form not for emergency or standard?

How can I achieve this please help!!

2 REPLIES 2

Dr Atul G- LNG
Tera Patron

Hi @Aryan 

 

You can do via 2 ways

- You can create the template and via template you can set the value

- You can use change model , and populate these varibales.

 

Last 

You can do via client script with conditions. 

*************************************************************************************************************
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/dratulgrover [ Connect for 1-1 Session]

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

Sohail Khilji
Kilo Patron

Hi @Aryan ,

Create a onLoad Client script as below:

 

 

function onLoad(){

if( g_form.getValue('type') == 'normal'){
g_form.setValue('short_description', 'your text here..........');
g_form.setValue('description', 'your text here..........');
}

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect