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.

Issue with Dynamic Reference Fields in Catalog Item

serviceNowDev68
Tera Contributor

Dear ServiceNow Community,

I am facing an issue with visualizing the following hierarchy in a Catalog Item, where all fields are reference fields:

  • User selects Location
  • Then Building
  • Then Floor
  • Finally Room

The hierarchy is structured as follows:

  • Room depends on Floor
  • Floor depends on Building
  • Building depends on Location

I created variables for Location and Building, but I realized that I can't make the fields dynamically dependent from bottom to top, so that the contents of the fields always adjust to the parent field. I noticed that there is a Tree Picker which can solve this in one field, but I couldn't integrate it into my variable in the frontend.

Our cmn_location structure is as follows:

  • Continent -> Country -> City (Location) -> Building -> Floor -> Room

Can someone help me with this?

1 REPLY 1

Susan Britt
Mega Sage
Mega Sage

On the reference variables, you should be able to set the ref_qual_elements variable attribute to set that dependency (e.g., ref_qual_elements=building would be added to the Floor variable, since it depends on the selected building value).