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:22 PM - edited 01-31-2024 09:41 PM
Hi @Pooja Khatri you would need 2 onchange client scripts.
1. onchange client script on Impact field
script:
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 09:31 PM
Hi @Harish KM - I tried with the below script for impact field :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 09:39 PM
var getImpact = newValue; //this should be newValue not impact
Or use below line
Var getImpact = g_form.getValue('impact');
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2024 09:53 PM
Hi @Harish KM - this did helped me and fixed the issue , but now I am facing just one issue if the urgency or Impact is changed from high to any other value back it is still hiding the options .
How can I fix this ?