- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2017 06:58 AM
Good morning,
Is there a way to make locations inactive in ServiceNow? We imported current(updated) locations from AD and users now have the correct locations within their company. However, the "old" locatoins are still available in the drop down menu. We do not want users to see these depricated locations.
Thank you!
Heather
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2017 07:03 AM
Hi Heather,
Here's how I would handle this - without deleting any of the previous records, because deleting can cause issues with broken references.
- Create a new field on the location (cmn_location) called Active (u_active) and make it a true/false field.
- Make the locations you want to appear active (true) and those that you don't, leave unchecked.
- Create a before/query business rule that automatically filters for the active records only. Use the "user query" business rule as an example (substitute YOURINSTANCE for your instance name in the following URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2017 09:19 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2017 05:23 AM
The filter condition simply says "Should the BR run" it doesn't actually do the filtering. In the Advanced tab, your script should contain:
current.addQuery('active', true);
That's the part that does the filtering of the records.
Scripting in Business Rules - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2018 06:56 PM
If it is really needed by many customers, would ServiceNow consider to make the field Active an OOB field and add corresponding business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 10:44 AM
I have tried what you suggested above and it still isn't working.
1. I added a new field on the cmn_location called Active (u_active) as true/false
2. Created a new BR for Location Query on the cmn_location table
3. Added your script line from below: current.addQuery('u_active', true);
4. I set one of my many locations to true to see if only that one returns
But for some reason when I click on the lookup button on the location, it returns all the locations for my incidents. I would be quite beneficial to have a BR rather than update all references especially since we prompt for location in many of our catalog requests. Here are my BR screen shots. So any help would be greatly appreciated, please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 11:28 AM
I removed the filter on the 'when to run' and it worked. no need for assistance but your information has been extremely helpful!