How to create a report to only show where count is > 1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday - last edited Friday
We are currently going through a requirement to build a report of type count and to only show records where the count is > 1.
Take this as an example.
Report should query alm_hardware with model category/class of Computer and group by assigned to.
It should only display records where when grouped by count is > 1 (Saying only to display hardwares where a user has 2 or more assigned).
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
Hi @AndresGT1
First of all, if you go to the alm_hardware table, you’ll notice that the Assigned to field allows only one entry for a given asset.
However, if you have a User related list, then you can try something like this:
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
Hi @AndresGT1
alm_hardware table has only 1 assigned to
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
Just to keep everything under 1 thread I'm replying here.
Basically this is the business case:
This report will help to validate that users only get assigned 1 hardware. This report will show all users having more than 1 active hardware assigned.
Not sure if the report you suggested will do that part because it's not multiple users assigned to a users but multiple hardwares assigned to a user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Friday
Hi @AndresGT1
Got it now.
Let’s take the reverse approach — instead of going to the alm_hardware table, go to the sys_user table. There, you can apply a filter in the related list.
The key point is that every Asset is also a CI (Configuration Item), so you can search using that relationship.
I added greater than 3 to show you the results
But issue is we cant show the asset information in column in report so you need to create a database view with alm and user table if you want to know asset tags as well else the above report good to go.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
