- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 03:21 PM
I have a variable referencing sys_user_group table however, i want ONLY group A to show in the field when searching the group table and ONLY the members of group A should show up when selecting a user. How can i best achieve this?
Thanks for your help.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 05:36 PM
So you're saying for the group field you only want Group A to show...then why aren't you setting the default value of that field to Group A?
In the variable settings for that field, set the default value to the sys_id of Group A, that way it's already selected.
To get the group sys_id...you can go to your group listing within your instance and right-click on the record/line item and copy the sys_id, like so:
Then for your reference field for the group members...do below:
You'd want to set the reference qualifier field on the group member field to be:
group=sys_id_of_group(same as you used above)
So in this group member field you now have to make, go to the reference qualifier section and set it with the above.
Example:
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 03:25 PM
Hello,
Only groups will show up in that reference field, do you have another reference variables for the members to show?
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 04:53 PM
Yes. It appears i will need a second field for the group member (sys_user_grmember). How do i restrict to ONLY the members of the group? (please note the group field is restricted to only group "A"). Please provide steps if available.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 05:36 PM
So you're saying for the group field you only want Group A to show...then why aren't you setting the default value of that field to Group A?
In the variable settings for that field, set the default value to the sys_id of Group A, that way it's already selected.
To get the group sys_id...you can go to your group listing within your instance and right-click on the record/line item and copy the sys_id, like so:
Then for your reference field for the group members...do below:
You'd want to set the reference qualifier field on the group member field to be:
group=sys_id_of_group(same as you used above)
So in this group member field you now have to make, go to the reference qualifier section and set it with the above.
Example:
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 08:05 PM
Allen, thank you so much. This looks like what i need. The reference qual with the group sys_id was pulling up the sys_id of the members and not their names.
I found the below on community and it worked
javascript:var gr = new GlideRecord('sys_user_grmember');gr.addQuery('group',"<insert your group's sys_id>");gr.query();var users='';while(gr.next()){users+=gr.user.sys_id + ",";}"sys_idIN" + users;