Need help with Client script on the incident table for Impact and Urgency fields ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 09:07 PM
Hello All ,
I have a requirement where in my Incident form there are two drop down fields - Impact and Urgency
in Impact the options are : 1 - widespread , 2 - significant , 3 - moderate , 4 - contained , 5 - isolated
and in Urgency we have option : High , Medium High , Normal
so for all the users other than the manager role , if the user selects and option of 1 - widespread in IMPACT it should hide the option for High in URGENCY and
if they select High in URGENCY it should hide the option of 1-widespread in IMPACT
and it should throw and alert message saying 'Only Managers are allowed to select values'
How can I implement this functionality ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 09:59 PM - edited 01-31-2024 10:01 PM
Hi @Pooja Khatri In that case add a else part like this
if (getImpact == 1) //impact value 1 for high
{
alert('Only Managers are allowed to select values ');
g_form.removeOption('urgency', 1);
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 10:09 PM
Hi @Harish KM - I did try with this but it gave me the below error :
Script I used :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 10:22 PM
Hi @Harish KM - also for users with 'Manager' Role , the options from the URGENCY and IMPACT fields are getting removed - ideally the options should be visible for them in any of the given scenario .
How can I fix that part ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 10:28 PM
Hi @Pooja Khatri you need modify the if condition like below
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 10:48 PM
Hi @Harish KM - Can you help me to fix this one ?