Report of users without an asset

Alex Macdonel
Tera Expert

I've been tasked to build a report of all users that DON'T have an asset or CI assigned to them.

 

Out of ServiceNow I would export my user table, and my asset table and using a VLOOKUP I would come up with a list of users without an asset.

 

My first impulse is to create a database view of both tables and see where that takes me.

 

What are your thoughts on this, how would you tackle this?

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi Alex,



To do this you would need to create a Database View. I actually answered a question very similar to this recently in another forum and am planning to do a blog post, but have not yet had the opportunity. This topic is also covered in the next release of our Asset Management class, as it is a bit of common information that Asset Managers want to report on.



Here are the reasons you need a Database View with a left join for this:


  • You want to report based on users, but the one-to-many relationship here means that the assets point to a user. The user record does not have a direct reference to the assets.
  • The view allows you to merge the tables based on the sys_id of the user matching the assigned_to of the asset so that each match is displayed as a single row.
  • The left join allows all users to display, even if they do not have a corresponding asset, which is vital to the report in this case.

I have an update set, created on Eureka, if you want to take a look at a sample of what I put together in responding to the other question, which was to see all users without an assigned computer. It should give you an idea of what to do.



Here is a screenshot of the Database View I created to do this and the Try It so you can see what columns I selected to display in the view. You can easily create a report that shows where Name is empty to get the information you need.



Please let me know if you have any questions.



Ben



Screen Shot 2014-07-11 at 7.56.46 AM.png



Screen Shot 2014-07-11 at 7.58.36 AM.png


View solution in original post

9 REPLIES 9

Thanks for this, this is what I was thinking of doing when I posted but it was too late and my brain was fried.



The only drawback with this method is that users with no CI / Asset end up with an entry that shows a link to an <empty> record; I can see some user clicking this to create a record and I don't know what will happen if they do.



Cheers!


Community Alums
Not applicable

Database Views are strictly for reporting and cannot be used to manage data in ServiceNow. There will not be an option to create from it.


Hi, this message is for Ben.

 

Ben by any chance do you have any  sample Job Aid   that you may have created for Asset Management module.

If yes,  could you please share? Or  point me to any   resources?

 

Thanks

Siva

Pavan Kumar1
Tera Contributor

Hi, 

I have a requirement where I have to create a report which contains records which DO NOT have relationships (We have a custom table u_test which has relations created with Software records using cmdb_rel_ci).  I am currently pulling 2 reports first report of all records from u_test and pulling a report from cmdb_rel_ci where parent is u_test. I am taking these 2 reports and doing a VLOOKUP using EXCEL to get records which do not have relationships. Can I get such report directly from Service Now?

Community Alums
Not applicable

Yes. You should be able to do something similar to what I described in "How Do You Report on Nothing?" (https://community.servicenow.com/community?id=community_blog&sys_id=aface625dbd0dbc01dcaf3231f961963&view_source=searchResult) so you can see the items in u_test that are not referenced in the cmdb_rel_ci table.