Catalog Builder - Reference qualifier

StefanSrba
Tera Contributor

Hi all,

I’m new to ServiceNow and am trying to figure out how to set up the Service Catalog.

I need to implement a Lookup Select Box question that filters its options based on another field.

The only way I’ve managed to get filtering to work is by switching the field type to Reference and using a Simple reference qualifier. However, when I use Lookup Select Box with a fixed reference qualifier (as shown in the screenshot), it doesn’t behave the same.

I have another field that has this kind of dependency working correctly, but I haven’t been able to replicate it.

 

What am I missing? What is correct way to format reference qualifier?

StefanSrba_1-1751008921983.pngStefanSrba_0-1751008900714.png

 

StefanSrba_2-1751008936766.pngStefanSrba_3-1751008986482.png

StefanSrba_5-1751009053033.pngStefanSrba_6-1751009070461.png

 

StefanSrba_7-1751009119595.pngStefanSrba_8-1751009157574.png

1 ACCEPTED SOLUTION

Nishant8
Giga Sage

Hello @StefanSrba, can you please do as following:

- replace reference qualifier as: 

adding screenshot so that you use right javascript

Nishant8_0-1751013849456.png

javascript: 'u_operating_system='+current.variables.u_operating_system;

- use Variable Attribute as: 

ref_qual_elements=u_operating_system

 

Regards,

Nishant

 

View solution in original post

7 REPLIES 7

Hello @StefanSrba, Could you please use following as Reference qualifier of subcategory:

javascript: 'u_operating_system='+current.variables.u_operating_system+'^u_category='+current.variables.u_category;

 

adjust the field name accordingly if any typo in my script.

 

Regards,

Nishant

Thank you so so so much!

pavani_paluri
Giga Guru

Hi Stefan,

When there's a dependency on another variable, you need to use the following format in the reference qualifier:

javascript:'u_operating_system=' + current.variables.u_operating_system
This ensures that the dependent variable filters its options based on the selected value of u_operating_system.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P