- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 06:12 PM
Hi - is there an easy way to prevent discovery from populating the location on the ci except removing the location from discovery schedule? Like a system property or something else? Appreciate any insight!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 07:00 PM - edited 10-23-2023 07:01 PM
Hi @RK25
The CI location is populated from 2 sources, one is from the assigned_to field user record and the other is from Discovery Schedule. Check the following link for KB.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0864114
If you want to prevent the location being populated, you can write an onBefore Business Rule on cmdb_ci table and define the conditions for which the location field should not be set and in the script set the value field to empty. For example if you don't want the location to be populated for Windows Server CIs,
When to run: Before - Insert / Update
Conditions: Class :: IS :: Windows Server
Script:
(function executeRule (current, previous){
current.location = '';
})(current, previous);
Please mark my answer helpful and accept as solution if it helped you 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 07:00 PM - edited 10-23-2023 07:01 PM
Hi @RK25
The CI location is populated from 2 sources, one is from the assigned_to field user record and the other is from Discovery Schedule. Check the following link for KB.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0864114
If you want to prevent the location being populated, you can write an onBefore Business Rule on cmdb_ci table and define the conditions for which the location field should not be set and in the script set the value field to empty. For example if you don't want the location to be populated for Windows Server CIs,
When to run: Before - Insert / Update
Conditions: Class :: IS :: Windows Server
Script:
(function executeRule (current, previous){
current.location = '';
})(current, previous);
Please mark my answer helpful and accept as solution if it helped you 👍✅
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 11:53 PM
@RK25 Can you please also accept my answer as solution, if it helped you 👍
Anvesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2023 09:50 PM
There is no System Property OOTB to Control it.
As given in KB you can control it with Some Customization even if LOC is given in Discovery Schedule.
You can create a System Property and Use it to Control in given Script where Location is Set/returned.
Regards
RP