
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2021 07:00 AM
How can I create a report showing user groups that contain no users? Also, groups with no roles assigned?
Thanks,
Adam
Solved! Go to Solution.
- Labels:
-
Reporting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:35 AM
Hey Adam,
I find it easy to report on these types of use cases using the related list conditions.
For example
A list of your groups, then use the related list condition to return all groups with group members less than one.
Useful to also find groups over a particular value as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2021 07:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 08:59 AM
You should look at running a background script- Classic reports show things that exist- its harder to report of things that dont exist.
So what you would do is gliderecord the Group table- then query the members of it- then you would do a getRowCount for every group you find, if row count = 0 Return Group name.
So that is pseudo code- you go to every group query the users and count them- if the amount is 0 you return the name of the group - run perfectly you will get your list in a few seconds..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:06 AM
Found another user that has a script that you might be able to use for your case:
https://community.servicenow.com/community?id=community_question&sys_id=a4b3fe4ddb2b970454250b55ca9619e1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 09:35 AM
Hey Adam,
I find it easy to report on these types of use cases using the related list conditions.
For example
A list of your groups, then use the related list condition to return all groups with group members less than one.
Useful to also find groups over a particular value as well.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 12:20 PM
Thanks Iain! That did work. I hadn't yet wrapped my head around how to use the "Related List Conditions'. So, that's a perfect example of how to use that. I will be able to adapt that for other uses for sure. Thanks!
Adam