- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 01:53 AM
How to pre-populate description field on incident form on change of vendor company.
Pre text would be - Name,Actions,Root Cause etc.
Regards,
Viraj
Solved! Go to Solution.
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 02:32 AM
Hello Viraj,
Write onChange client on your company field and in that add this code
if(newValue == "yoir_company") {
var desc = "Name: \nActions: \nRootCause: \n";
g_form.setValue("Description",desc);
}
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 01:58 AM
Hi Viraj,
You can create an OnChange Client Script against the company field to set the description field.
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 02:03 AM
Hi Viraj,
you would require onChange client script on company field; but from where values are to be fetched for Name, Actions, Root Cause etc to populate in description
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 02:09 AM
Hi Ankur,
I am not looking for values for name, action,root cause my requirement is when company is changed to X description should be visible with text in desc as below-
Description:
Name:
Actions:
Root Cause:
and value for above fields would then be filled by the user.
How could this be achieved?
Regards,
Viraj

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-20-2020 02:32 AM
Hello Viraj,
Write onChange client on your company field and in that add this code
if(newValue == "yoir_company") {
var desc = "Name: \nActions: \nRootCause: \n";
g_form.setValue("Description",desc);
}
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP