The CreatorCon Call for Content is officially open! Get started here.

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

find_real_file.png

Got it working. Added Product Name field under Dependent Field.

find_real_file.png

 

Yes that is certainly another way to accomplish this too.  Out of the box the task assigned_to is dependent on the assignment_group.  The method I described is useful too especially if you have multiple fields you need to use for the query such as an active flag on top of product name.

Hello Michael,

I have a question so if I need to change the first field value and then I need the second list field changes immediately so what should I do as in this case I have to use client script but how to set the second list field.

Thanks

Latoya
Kilo Guru

I changed the type to a string using the label and that worked.