Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Reference Field dependant on another Reference Field

MStritt
Tera Guru

Hello,

I would like to have one reference field dependent on another reference field on our case form. On our case form, I would like the 'Component' reference field to only show values that are related to the 'Product Name' field. In the screenshot below, when I click on the 'Component' lookup, I only want to see the values related to Product Name 'Digital PIN'.

find_real_file.png

 

 

1 ACCEPTED SOLUTION

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

You need to include the "javascript" prefix to evaluate the current value of u_product_name.  The following should work as your reference qualfier:

javascript:"u_component=" + current.u_product_name

View solution in original post

15 REPLIES 15

_Gaurav
Kilo Sage

Hello there,

To achieve this you can use reference qualifier in the second reference field. Just take the sys_id of first reference field and glide to <table> and from there you can get the values.

If it doesn't work then let me know.

Regards

Mike Patel
Tera Sage

right click on component configure dictionary>Reference qual add your field like component=current.product_name

Where would I add it? Under the 'Dependent Field' tab? And add it exactly as 'component=current.product_name'?

https://docs.servicenow.com/bundle/london-platform-administration/page/script/server-scripting/conce...


Please mark my response as correct and helpful if it helped solved your question.
-Thanks