- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 10:12 AM
Hello,
Appreciate your help in advance.
I have a reference qualifier condition to get active users, in a group from a company onto a field in catalog form.
I'm using reference on sys_user table and the Ref script is as below.
javascript: 'active=true^company=' + current.variables.company^sys_idIN'+getIDs("3c292940472cfd10f726ba67436d43b5"); function getIDs(grp){var m=GlideUserGroup.getMembers(grp);var ids=''; while (m.next()){ids+= (m.user+',');} return ids;}
I'm able to pull active users from the company, but issue is the script is not pulling the active users from that certain group.
Attached is the screenshot.
Please help.
-Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 10:22 AM
Hi @Shree Nag ,
Try this out
update the ref qual with
javascript & colon;'active=true^company=' + current.variables.company + '^sys_idIN' + getIDs("3c292940472cfd10f726ba67436d43b5");
function getIDs(grp) {
var m = GlideUserGroup.getMembers(grp);
var ids = [];
while (m.next()) {
ids.push(m.getValue('user'));
}
return ids.toString();
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 10:22 AM
Hi @Shree Nag ,
Try this out
update the ref qual with
javascript & colon;'active=true^company=' + current.variables.company + '^sys_idIN' + getIDs("3c292940472cfd10f726ba67436d43b5");
function getIDs(grp) {
var m = GlideUserGroup.getMembers(grp);
var ids = [];
while (m.next()) {
ids.push(m.getValue('user'));
}
return ids.toString();
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya