Generate a report that will report the assets held at each location in the location hierarchy

stevezap
Tera Contributor

Hi

I want to be able to produce a report that gives me the assets that are held at different levels of the location hierarchy.  The hierarchy is structured as below:

--> Company

----> Office x (Multiple Offices)

---------> Floor x (Multiple Floors)

--------------> Room x (Multiple Rooms)

The asset management team want to run reports that could include the following queries:

- What assets are held in Office X ? (this must include data all child, grandchild etc. etc. locations)

- What assets are held by the company with data showing all assets against all child location records from Office to Room?

I can run a report to show parent and child but not something that will traverse the entire location structure. 

All help appreciated.

2 REPLIES 2

Maik Skoddow
Tera Patron
Tera Patron

Hi

unfortunately the locations table does no offer a "path" field like the account table.

To realize your requirement you will have to implement a dynamic filter option which returns the Sys IDs of all children for a selected location.

See https://docs.servicenow.com/en-US/bundle/sandiego-platform-user-interface/page/use/using-lists/task/... 

Maik

Josh Cooper
ServiceNow Employee
ServiceNow Employee

It's mostly tough because it requires the data to be in place for this, but generally speaking if all of your equipment is tied to a Room location record, then those Room records would just have a parent that's a Floor, which has a parent that's an Office, and one that's a Company(Building).

Then your reporting is just a continued dot-walk... i.e. where parent of parent of parent of room = This Company.

It's still likely that you're going to need something beyond standard reporting to format the data in the way that you're wanting, though.

It's also possible that the Facilities Management application has some additional features to make this easier, but I'm less familiar with Facilities Management.

Another option is to create a similar structure in the CMDB, where Rooms, Offices, Buildings, etc, are treated as CIs, and then you add the ability to grab by CI Types as well in your logic (which I believe may be how Facilities Management does it.)

What that buys you is, where the first method above is VERY strict (i.e. it only works if Company is exactly 4 layers up from the Device), CMDB has it's own method of relating things together, so you can basically "Climb until the related CI type is Company" or even directly connect those together (although that shouldn't be necessary.)

CMDB gets you additional tools that may be helpful though, including visualization tools to help see the relationships between objects, like this one I did a long time ago where I converted tables in ServiceNow into CIs, to show inheritance that way (now there's a schema map function in the table itself, so this isn't necessary)

By making a new CMDB Class called Table and making CIs for each table in the system, I can actually use the CMDB functions to visualize table relationships:

find_real_file.png

Which isn't super helpful, but it works much better when you flip to the visualization view, like this one that shows cmdb_ci_computer:

find_real_file.pngSo it may be beneficial to remap those things as CIs in the CMDB, so that you can create relationships BEYOND simple Parent/Child.  

Even then though, it's going to take some additional formatting to show the report in the way that they want.  If you're looking to do the entire thing in ServiceNow, you're liking going to end up building something like a custom Service Portal page, or UI Builder widget to lay them out exactly how you want.

At least this will give you the data foundation to make it easier, though.