How can we automatically populate the location field value based on the naming convention of systems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2025 05:28 AM
How can we automatically populate the location field value based on the naming convention of systems, but only when the location field in the CMDB is empty? For example, if the system name begins with 'STL,' the location field should be updated to De-Stolberg.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2025 08:17 PM
Hi @Ria
You can achieve this by creating a before Business Rule [insert/update] and condition location ==empty.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2025 09:40 PM
Hi @Ria ,
You can configure the before insert BR with condition location is empty
In script section, write the below code
var systemName = current.name;
if(systemName.startsWith("STL"))
{
current.location='sys_id of your location';
}
In addition to above suggestion, you can also try to configure the Dynamic CI group to set non-discoverable attribute of CI.
FYR: https://www.servicenow.com/community/itom-forum/set-ci-attributes-using-dynamic-ci-group/m-p/944467
BR,
Gomathi K