Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Create Dynamic Filter to show manager of assignment group all tickets in their groups

Brent Cox
Giga Guru

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

Bert_c1
Kilo Patron

@Brent Cox 

 

Yes, using a Dynamic filter Option defined as:

 

Screenshot 2025-01-30 110506.png

Script Include:

Screenshot 2025-01-30 110615.png

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:

Screenshot 2025-01-30 110913.png