How to show manager name parallel to assignment group breakdown source filter name

Nisha Kumari2
Tera Contributor

I have one requirement to show name of manager of assignment group in parallel to assignment group name in PA breakdown source filter in a dashboard. Please refer the screenshot for reference. Please advice.

4 REPLIES 4

Tai Vu
Kilo Patron
Kilo Patron

Hi @Nisha Kumari2 

In the Breakdown Source, it showcases the Display field of the record. For instance, if your breakdown source refers to the Group [sys_user_group], it will display the Name field.

You won't be able to add anything to it unless you change either the Display field of the table or the data of the field.

 

An alternate method involves setting up a Manual Breakdown Source to serve as an intermediary. This source will contain a value combining the Group Name and Group Manager. This approach will provide the Source Data needed for your Breakdown.

 

Cheers,

Tai Vu

 

Hi @Tai Vu ,

 

Can you please briefly explain how to achieve the second alternate method?

 

Thanks,

Nisha Kumari

Hi @Nisha Kumari2 

Sure. There you go.

1. Create a Breakdown [pa_breakdowns]. Named Group - Manager

2. Define something to automate Manual Breakdowns [pa_manual_breakdowns] generation.

=> It can be a schedule job or a business rule, which will generate data into the Manual Breakdown table. Assume naming convention: (Group Name + " - " + Group Manager)

3. Create a Breakdown Source.

Table: Manual Breakdowns [pa_manual_breakdowns]

Conditions: Breakdown is Group - Manager

4. Create an Automate Breakdown using the Breakdown Source above.

5. Create a Scripting Breakdown Mapping (Check the Scripted flag)

6. Create a PA Scripts [pa_scripts] to handle the mapping.

What happens in the script is that you will do a query into the Manual Breakdown and return the sys_id of the record found.

Sample script below. (Incident Assignment Group)

 

var group = current.assignment_group.name + " - " + current.assignment_group.manager.getDisplayValue();
process(group);

function process(value){
	var grManualBreakdown = new GlideRecord('pa_manual_breakdowns');
	grManualBreakdown.addQuery('breakdown', '<breakdown_sys_id>'); //the sys_id of breakdown Group - Manager
	grManualBreakdown.addQuery('value', value);
	grManualBreakdown.query();
	if(grManualBreakdown.next()){
		return grManualBreakdown.getUniqueValue();
	}
	return '';
}

 

Remember to include the relevant fields into the PA Script.

Screenshot 2023-11-07 at 15.35.27.png

 

7. Now you can add the Automate Breakdown to your Indicators.

 

 

Cheers,

Tai Vu

Nisha Kumari2
Tera Contributor

Hi @Tai Vu ,

 

Thanks for advising. Let me try this approach.

 

Thanks,

Nisha Kumari