- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2020 04:42 PM
I've been searching the community but nothing has come up that will work for me. I'm trying to enhance a catalog item we have that is for managing group membership. We'd like the person submitting the request to be able to select a user from a list and then the groups that user is in displays.
Essentially, it would be useful for the submitter to know which groups they were in (or another user was in) to make an educated guess about what group to put the other person into (e.g. "I know I have Case access, and this guy needs Case access, so which group do I have?").
So something like this:
[Selected User]
Assignment Groups:
• Group A
• Group B
Other Groups:
• Group C
• Group D
Is this doable? Will I need to engage the devs on my team? I'm not coder myself, although I can manipulate existing scripts to work in some cases.
Thanks,
Steve
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2020 05:56 PM
Then you will have to create Script Includes like below
var commonUtil = Class.create();
commonUtil.prototype = Object.extendsObject(AbstractAjaxProcessor, {
getUserGroups: function(user) {
var groups = [];
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', user);
gr.query();
while (gr.next()) {
groups.push(gr.group.sys_id);
}
return 'sys_idIN' + groups.toString();
},
type: 'commonUtil'
});
On variable of for groups do below
javascript:new commonUtil().getUserGroups(current.variables.person_to_mirror);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2020 04:47 PM
How you are showing groups right now.
One way will be to create list collector variable on that catalog item.
and reference it to sys_user_grmember and add reference equl something like
javascript:'user='+ current.variables.youruservariablename; //User field needs to be on sys_user table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2024 06:46 AM - edited ‎10-19-2024 06:47 AM
Hey Mike,
I am trying to do the opposite.
I want to display members of a group.
This req qual is now in sys_user_table list collector variable with the requal listed below
I had reference sys_user_grmember but that did not work either.
Here is what I have so far. could you assist?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2025 09:21 AM
Hey @Community Alums, Were you able to find solution for this? I am stuck on the same thing and my code looks similar to yours.
Please let me know the solution you implemented.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2020 05:04 PM
Currently using a Lookup Select Box for the user to select the Group, and then a List Collector for them to select the users to add.
So your suggestion would auto-populate the groups for a selected person in the list collector? I will give it a try in the morning.
Here's what it looks like currently (I'm Steve Ameling so not giving away any names here.)