The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Locations Hierarchy in CMDB

Ulrich Schulte
Tera Contributor

I want to track locations of my hardware assets (for example for a network printer) in the CMDB showing the following information: City (or site) -> Building -> Floor -> Room.

 

First of all: Is there any best practise available on how to do this? (did not find something useful at ServiceNow reference docs yet)

 

We do have the location field for CIs, but in general this is being used for cities or sites, but not for rooms. 

 

My idea: Create child locations. So I got for example "Hamburg" as a parent location / site, below Hamburg I create "buiding A", "building B" etc. as child locations, below each building I create "floor 1", "floor 2" etc. and below each floor I create rooms like "room 101", "room 207".

 

The challenge I got now is how to assign a room to a CI. When I open a CI and click on the magnifier symbol next to the location field, a huge list pops up showing all locations existing. No chance to search or filter within that list. Not feasible. 

 

When I start typing "room" into the location field it actually does show me rooms only. However: "Room 107" might exist several times in several buildings and cities. So it shows me several "rooms 107", but I cannot see which "Room 107" is the one from Hamburg. I would need to select each of the search results, then I'm able to lookup the details. And if I'm lucky, the first one I pick is the right one. Or the third. Or the tenth. Not feasible as well.

 

Any idea on how to tackle this? How are you doing this in your CMDBs?

6 REPLIES 6

I like that approach showing different columns in the search results reflecting the hierarchy. Would be nice if column headers like city, building, floor, room would be shown as well 😉

 

Anyway - this might be something I will consider to go for - so far I did not make any progress with this, as I was busy with other priorities.

Ulrich Schulte
Tera Contributor

Finally I will go for this solution:

 

1. Create a location hierarchy with Site\Building\Floor\Room as mentioned in my initial post.

 

2. In order to tweak the lookup-field showing more information we have set these paramaters:

System definition -> Dictionary -> table name: CMDB_CI / click on column name: Location

(if you want to do it for a specific CI type only, select the table name instead)

 

3. Set these three paramaters:

  • Reference auto completer” -> “AJAXTableCompleter
  • Reference auto completer columns search” -> “true”
  • Reference auto completer columns” -> “parent.name;parent.parent.name;parent.parent.parent.name”

These will a) display all columns of the hierarchy in the lookup field b) enable search within the columns, so you can type in either site, building, floor or room search terms and it will find and display the relevant entries.