How to change impact and urgency based on another field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 04:52 PM
Hello so I need help with changing impact and urgency. I am auto populating three fields called category, application/device, and cause.
each field is auto populated so application/device is populated based on category and cause is populated based on application/device. I am using this table to populate them
also using script includes to do all that. Now what i have to do is have impact and urgency be populated based on cause field. I am stuck on how to do that. any help will be appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 05:24 PM
Write a Before business rule on incident table and use the following script
Also make sure the condition is set to application device changes or category changes or cause changes
var gr = new GlideRecord("u_jda");
gr.addQuery("u_application_device", current.u_application_device); // update the field names
gr.addQuery("category", current.category);// update the field names
gr.addQuery("u_cause", current.u_cause);// update the field names
gr.query();
if (gr.next()) {
current.impact = gr.u_impact;// update the field names
current.urgency = gr.u_urgency;// update the field names
}
Note: left side field names (gr.FIELD_NAME) are on the JDA table where as current.FIELD_NAME is on incident table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2019 06:15 PM
Based on dvp response , if you want to have them auto populated on insertion of a record and click save then you can follow what dvp said
if you want to have the impact and urgency fields to be set as soon as you change the cause then you have to write an onchange client script on cause and call a client callable script include and then set the values of impact and urgency by gliding the records in jda table
Hope that helps
Mark this response as correct if that really helps
Thanks,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 03:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 06:57 AM
Here is the format for addOption method
g_form.addOption('priority', '6', '6 - Really Low'); // 3rd parameter should be label value