Reporting Query

Vinay Kukreja
Tera Contributor

Hey guys,

I created a list report which displays the Manager and Group name as the only columns, and that works perfectly.
However, I created an Reference interactive filter which on the Group Table(sys_user_group) and im unable to determine what the Interactive Filter Reference related list should have.

My use case is to display the Assignment group on the interactive filter and based on what is chosen, the report should reflect the group and aligned manager.
Can someone help me around this?

 

3 REPLIES 3

Vishal Jaswal
Giga Sage

Hi @Vinay Kukreja 

I believe it is not possible as if you use a Filter in the dashboard and use the Filter Source Table as Incident and then select Field as Assignment Group, then it will automatically change the Table from Incident to Group because Assignment group is a reference field.

VishalJaswal_12-1744400925515.png

and then the Data to Filter is where you will end up selecting Group table which is like filtering the same table.


Hope that helps!

Bert_c1
Kilo Patron

If you want a Dynamic Filter for Assignment Group, I've tested the following:

 

Screenshot 2025-04-11 155530.png

 

Corresponding script include:

Screenshot 2025-04-11 155548.png

The script contents:

var managerGroups = Class.create();
managerGroups.prototype = Object.extendsObject(AbstractAjaxProcessor, {

	getManagerGroups : function () {
		var mgrGroups = [];
		var grpManager = gs.getUserID();	// current user is a group manager
//		grpManager = '46d44a23a9fe19810012d100cca80666'; // Beth Anglin

		//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.sys_id.toString());
		}

		return mgrGroups;
	},

	type: managerGroups
});

Based on the desired is to see the groups the current user is a manager of.

 

If this is not what you want. Please provide more details on your goal. I'm not sure what a "Interactive Filter Reference related list" is.

LilyHarlow
Kilo Contributor

Check filter settings and reference fields to link manager and group.