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.

Configuration items on the basis of Location

Hamza Yaqub
Tera Contributor

I have a requirement to display configuration items on the basis of the selected location in the catalog item.

 

If I select VDI Location: XYZ

The configuration item field should display the items of XYZ location.

Untitled.png

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

Put a reference qualifier on the Configuration item variable:

javascript: 'location=' + current.variables.vdi_location

where : is replaced with the actual colon character, and vdi_location is the name of your location variable

It's for a single location. But I have multiple locations, if u have any solution for this then let me know.

 

This is assuming the use of the location field on the configuration item table which is a reference to the cmn_location table so only contains one value.  If you've added a custom list field to the location table, or are using a custom ci table, then make sure 'location' is replaced with your custom field name and try LIKE instead of =