Client script: Show "Resolution Code" choices based on Category

Marissa N_
Kilo Expert

Dear experts,

I've tried to use "Dependent fields/value" to make some choices of the "Resolution Code" field become available or hidden, based on what category my Case (CSM) is on.

I found through posts like Add multiple dependants in field for Choice - IT Service Management - Question - ServiceNow Communit... that you cannot add multiple dependants for a choice, which is what I require.

Since I am not yet proficient in scripting, I was hoping someone could help me write a client script that does the following:

  • When Category is set to choice "Normal Change" (value 6), show "Resolution Code" choices 17 & 18 (values)
  • When Category choice is set to anything else, show all other choices (0 4 3 5 7 8 9), except 17 & 18.

I tried to leave the "dependant value" empty, but this only resolves in the other choices to show when Category is set to "None". Hence I figured I need a client script! I see however many warnings about client scripts; will this be impactful on our performance and hence not-advisable? Are there any alternatives?

Thank you kindly for the help!

Kind regards,

Marissa Nijhof

6 REPLIES 6

Dear Pavan,

Thank you again for the help. Sadly this did not solve the issue. I will bring this to our development vendor and see if they can figure it out. 

Thank you loads for the help!

Kind regards,

Marissa 

Pavankumar_1
Mega Patron

Hi @Marissa N. 

 

If your issue got resolved, please Mark ✅ Correct/Helpful.

 

Regards

Pavankumar

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar