Create Dynamic Filter to show manager of assignment group all tickets in their groups
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 08:22 AM
I would like to set up a dashboard with a report that shows all tickets assigned to groups that the viewer is a manager of. Is it possible to create a dynamic filter for this that can be applied to a report?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 08:09 AM - edited 01-30-2025 08:31 AM
Yes, using a Dynamic filter Option defined as:
Script Include:
Script from above
function ManagerGroups() {
var mgrGroups = [];
var grpManager = gs.getUserID();
// grpManager = '46d44a23a9fe19810012d100cca80666'; // Beth anglin
// gs.info('ManagerGroups: Manager = ' +grpManager);
//Get the groups where grpManager is the 'manager'
var grps = new GlideRecord('sys_user_group');
grps.addQuery('manager', grpManager);
grps.query();
while (grps.next()) {
//Add the group sys_id values to the returned array
mgrGroups.push(grps.getValue('sys_id'));
}
// gs.info("Returning: " + mgrGroups);
return mgrGroups;
}
Use that for any reference field to 'sys_user_group'. See: