quesion on script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @Srini19 ,
var gr = new GlideRecord('sys_user_group');
gr.addEncodedQuery('active=true^sys_idNOT INsys_user_grmember.group');
gr.query();
while (gr.next()) {
gs.print("This group has no member----" + gr.name);
}active=true ensures you are only checking active groups.
sys_idNOT INsys_user_grmember.group means you are selecting groups whose sys_id does not exist in the group field of any sys_user_grmember record, i.e., groups with no members.
Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Thanks & Regards,
Mohammed Mustaq Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
are you sure this script will work?
It would be nice if you could share a working example with output so that it helps other members.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @Ankur Bawiskar ,
I have executed in my PDI i got the output like
Correct me if i am wrong Ankur i will correct it, Thanks
Warm Regards,
Shaik Mustaq.
