How to set default value on fields only for normal change form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 04:35 AM
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!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 04:38 AM
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.
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]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 04:40 AM - edited 03-26-2024 04:41 AM
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....