- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 08:34 AM
I have a user group called On call support . Group contains 9 users .
How to get those users into service catalog variable .
It could be a select box , reference variable or any better one . Just need to select one user from the 9 users and assign.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 08:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 08:52 AM
Hi,
You should create a Variable of type Lookup Select Box. Set it to point to sys_user_grmember table, the value should be set to User, mark the Unique values and add reference qualifier to filter the group.
E.g. get only users from Network group:
The result is this:
Hope this helped.
Best regards,
Łukasz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2019 09:05 AM
Hi,
So user group is a reference variable on catalog
then create a reference variable to sys_user table and have reference qualifier on 2nd variable to only show members of the above group
put the below line in reference qualifier
javascript: getUsers();
script include code
function getUsers(){
var arr = [];
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group', current.variables.groupVariable); // put your group variable name here
gr.query();
while(gr.next()){
arr.push(gr.getValue('user'));
}
return 'sys_idIN' + arr.join(',');
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader