Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2018 06:43 AM
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2018 06:51 AM
Hello,
If you don't need it in a report, this can be run as a normal Background Script for immediate respons.
var total = 0;
var group = new GlideRecord('sys_user_group');
group.addActiveQuery();
group.query();
while(group.next()){
var member = new GlideRecord('sys_user_grmember');
member.addQuery('group',group.sys_id);
member.query();
if(member.next()){
}
else {
total += 1;
}
}
gs.print(total);
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018 12:10 AM
Thanks a lot for your helpful Information.