client script on incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2025 10:30 PM
i want when category = software make priority = 1-critical (which is derived from the values of Impact and Urgency fields), else display the old value when the form loaded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2025 11:00 PM
Hello @krajrajput2111
To meet your requirement refer the screenshot and script below:
Configuration setup:
Client script:
function onLoad() {
//Type appropriate comment here, and begin script below
var category = g_form.getValue('category');
// Set priority if category is "Software"
if (category == 'software') {
g_form.setValue('impact','1');
g_form.setValue('urgency', '1');
g_form.setValue('priority', '1');
}
// No change if category isn't "Software"
}
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2025 11:04 PM
i tried this already, thing is when software is selected it works fine, but without saving when category is selected to some other value say Network, still it shows 1- critical.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2025 11:04 PM - edited ‎01-26-2025 11:06 PM
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2025 11:12 PM
Hi @krajrajput2111 try below code