Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var arr=[]; //empty array that can be used later to capture the group names
var gr = new GlideRecord("sys_user_group");
gr.addActiveQuery();//active query to capture to query through all the active groups
gr.query();
while(gr.next()){
var br= new GlideRecord("sys_user_grmember"); //querying grmember table to validate group's members
br.addQuery("group",gr.sys_id.toString());
br.query();
if(!br.hasNext()){ // if no member then capture the group name in the array
arr.push(gr.name.toString());
}
}
gs.print(arr.join(",")); //printing the array with all the memberless group names
Loading