- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 10:35 AM
Hey All,
I feel that I am missing something and I'm not sure what it is.
Here's my advanced reference qualifier on my catalog variable reference the sys_user table.
javascript: new getGroupMembers().getGroupMembersForIT(current.variables.assignment_group);
Here's the script include, which is global, client callable.
var getGroupMembers = Class.create();
getGroupMembers.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getGroupMembersForIT: function(assignmentGroup) {
var arr = [];
var grp = new GlideRecord('sys_user_grmember');
grp.addQuery("group", assignmentGroup);
grp.query();
while (grp.next()) {
arr.push(grp.sys_id.toString());
//gs.info("This are the values for the arr: " + arr);
}
return 'sys_idIN' + arr.toString();
},
type: 'getGroupMembers'
});
What am I doing wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 10:47 AM
You are returning sysids of group members table
But you should return user sysids
var getGroupMembers = Class.create();
getGroupMembers.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getGroupMembersForIT: function(assignmentGroup) {
var arr = [];
var grp = new GlideRecord('sys_user_grmember');
grp.addQuery("group", assignmentGroup);
grp.query();
while (grp.next()) {
arr.push(grp.user.toString());
//gs.info("This are the values for the arr: " + arr);
}
return 'sys_idIN' + arr.toString();
},
type: 'getGroupMembers'
});
Try this
Regards
Chaitanya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 10:43 AM
Did you add the "ref_qual_elements=assignment_group" to the var that uses the script? Also did you make sure your script include is returning the expected value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 10:47 AM
You are returning sysids of group members table
But you should return user sysids
var getGroupMembers = Class.create();
getGroupMembers.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getGroupMembersForIT: function(assignmentGroup) {
var arr = [];
var grp = new GlideRecord('sys_user_grmember');
grp.addQuery("group", assignmentGroup);
grp.query();
while (grp.next()) {
arr.push(grp.user.toString());
//gs.info("This are the values for the arr: " + arr);
}
return 'sys_idIN' + arr.toString();
},
type: 'getGroupMembers'
});
Try this
Regards
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 05:03 AM
It still didn't work for me. The ONLY thing that is giving me any results is adding "sys_idIN" to the advanced reference qualifier within the catalog variable, but it doesn't return a result, the pop-up view is blank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 05:45 AM
Hi @0890KM ,
the script works for me
is the variable assignment_group is populated?
can you share more details of these variables assignment_group and user variable
screenshots of variables? types and references sections
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya