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 dependent on value of another field

Celliven
Giga Expert

I know this is a 101 question, though I am having a mental blank.

I have added a reference field of configuration items [cmdb_ci] to a form and I want it to offer choices based on the value of another field   1st Rack [u_1st_rack], which is linked to Locations [cmn_location].

I want to specify a location in 1st Rack, then have Configuration Items only display CIs that are in the location specified.

I have set the dependency, but am not sure if it is the Attributes I need to set or a Dictionary override?

find_real_file.png

I can find lots of things that talk about dictionary overrides but not a lot that gives practical examples of setting attributes.

Thanks

Chris

13 REPLIES 13

Hi Harishkumar




I have a field 1st Rack, which is a reference field looking at the smn_location table, and this works fine



find_real_file.png



When I try and get the 1st Affected CI to show me the CI based on Location, as you had, I get all the CIs



find_real_file.png



Thanks



Chris


Dependent field should be on configuration item table not on location table.I can see you have given dependency on location table


Regards
Harish

are you suggesting that I should be using Configuration item or Configuration item.location, as I tried both with no result.



find_real_file.png


find_real_file.png



See the above screen shot. here I am using Configuration Item field as a "list " data type. I want CI based on locations. SO i went to dependent section


here I selected location in your case this should be the "1st rack".


Regards
Harish

That is what I did



find_real_file.png



Though this still doesn't make a difference, it is as though it doesn't recognise the value in the 1st Rack field.