Question on incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 01:55 AM
Hello
I have one requirement on incident, When caller is VIP then only impact choice "vip user" should be visible otherwise aren't visible for non vip user.
Could you please help on this to get the proper solution.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 09:48 PM
@suru2 Please create an onChange Client script on the incident table as follows.
Here is the script.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var caller = g_form.getReference('caller_id', callerCallback);
function callerCallback(caller) {
if (caller.vip) {
g_form.clearOptions('impact');
g_form.addOption('impact', 'vip_user', 'VIP User');
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 10:00 PM
@suru2 Agree with @Sandeep Rajput response.
Just an add,
If your requirement is to have only one Value available in impact field then i would recommend to auto populate it and make it read only.
If your requirment is to have the choice 'VIP User' visible along with other choice values for Impact field, then use the g_form.addOption method. (g_form.clearOptions is not required)
Hope this info helps.