- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2019 05:40 AM
We have groups at 2 levels. Understanding that the group member tab shows the list of members of that group, we need to also display the members of children groups.
For example: Group C has members X, Y, & Z and is a child to group P. Group P has members A, B, & C. When a user opens group P, that user needs a related list showing the group C members. Ultimately, we would like a single list showing all member of the group and all children but a second tab showing just the children group members works for now.
Is this possible? If so, how?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2019 06:08 AM
You can accomplish this by creating a new Relationship record and using it to query for group members of child groups.
Go to System Definition > Relationships and create a new record.
Name:
Child Group Members->Parent Group
Applies to table:
Group [sys_user_group]
Queries from table:
Group Member [sys_user_grmember]
Query with:
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
current.addQuery('group.parent', parent.sys_id);
})(current, parent);
Go to a group record, open the context menu, and go to Configure > Related Lists. Select the relationship record you just made. That's it! You may want to rename the related list on the form to give it a better name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 08:39 PM
Did you ever get solution to this? I am running into same problem.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2020 06:35 AM
In addition to the script examples for building relationships, we added similar scripts to the calculated value of the dictionary. That allows users to select the members of children groups from a form such as a task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2020 04:18 AM
Check this out and see if it helps. Its how I pull assignees from sub groups up to parent groups for assigning things.
Handling Groups and Subgroups - Developer Community - Question - ServiceNow Community

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2020 04:27 AM
Hiya... Yes we did!!
so step one.. create a business rule!
Step 2, create another business rule to remove members if they are removed from one of the child groups! Another business rule...
Within both of the business rules leave the "actions" tab blank.
Hope this helps you!