Report of groups with no users

Adam H1
Tera Expert

How can I create a report showing user groups that contain no users? Also, groups with no roles assigned?

Thanks,

Adam

1 ACCEPTED SOLUTION

Eeson
Mega Guru

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.

find_real_file.png

View solution in original post

9 REPLIES 9

Tsura Andreeva
Mega Sage

find_real_file.png

bammar
Kilo Sage
Kilo Sage

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..

Tsura Andreeva
Mega Sage

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

Eeson
Mega Guru

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.

find_real_file.png

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