Grouping Assignment groups in an interactive filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 01:01 AM
I need to create an interactive filter that has :
All Tech hub (list of 30 assignment groups)
2/3 level (list of 50 assignment groups)
ServiceDesk ( list of 6 groups)
I don't want the actual "list" to be shown I just want to choose "all tech hub", "2/3 level" or "ServiceDesk" and the reports will update based on the groups contained in these.
How do I do that? I have tried with "group" and "cascading" but can't get it to work as I want
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 11:49 AM
Seems one Dynamic filter won't work for the 3 'parent' groups. You will need one for each parent group. I've tested the following, where in my instance, the 'Database' group is the parent on 3 other groups. And the 'HR' group is the parent of 14 groups. A single Script include will work for each. The definitions follow.
Dynamic Filter:
The script include:
The script contents:
var GetChildGroups = Class.create();
GetChildGroups.prototype = Object.extendsObject(AbstractAjaxProcessor, {
initialize: function() {
},
getGroups : function(grpName) {
var grpid = '';
var grp = new GlideRecord('sys_user_group');
grp.addQuery('name', grpName);
grp.query();
if (grp.next()) {
grpid = grp.sys_id.toString();
}
var result=[];
var childgrp = new GlideRecord('sys_user_group');
childgrp.addQuery('parent', grpid);
childgrp.query();
gs.info("GetChildGroups: Found " + childgrp.getRowCount() + " child groups.");
while (childgrp.next()) {
result.push(childgrp.sys_id.toString());
}
gs.info('GetChildGroups: Returning: ' + result);
return result;
},
type: 'GetChildGroups'
});
Assuming you've set the 'parent' group on each of the many child groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2025 10:51 PM
Thanks - at the moment we dont have the parent groups to group them on.
But certainly worth a try - maybe someone else needing this can give some feedback if it solved the issue for them 🙂