Can a choice field be dependent on multiple dependent values?

Ron Legters
ServiceNow Employee
ServiceNow Employee

Customer has three types of Incidents: Service Desk, Standard, and Major. They currently have 32 choices for Category, so to make that more manageable, they'd like some of the categories to show for Standard or Major, but not Service Desk, some just for Service Desk, and some for all three. I know I can manage this with a Client Script and g_form.addOption() and g_form.removeOption() but with so many choices, that's going to be a very unpleasant CS to create, and more importantly, to maintain going forward as Categories change. So, I'm wondering if I can do this with dependent values. I could make Category dependent on 'Incident Process Type', but that doesn't help if I can only supply one value for the dependency, since a Category could be correct for 1, 2 or 3 Incident types.

I've tried doing a comma-separated list, a semi-colon separated list, and the 'or' operator (||) all to no avail.

Am I trying to do the impossible?

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

All choices are stored in sys_choice table.

You can use advanced reference qualifier and configure script include.

Script include in advanced reference qualifier will pass current object incident type and function in your script include will return category.

 

Check below for advance reference qualifier.

 

https://docs.servicenow.com/bundle/orlando-platform-administration/page/script/server-scripting/conc...

 

Regards,

Sachin

 

This makes sense, but where do I put the Advanced Reference Qualifier on a string field?

Raheem Pp
Tera Contributor

Hi Ron,

 

Did you find a solution for this? I am also having the same issue and I think I will have to duplicate the choices for each dependent values.