Performance Analytics - Manual Breakdown on String field - Sharing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunday - last edited Sunday
Dear community,
let me share you, what took me hours to make it work.
Despite using AI, and search, there was no straight forward or complete step by step solution, due to missing pieces here and there.
Issue: String Field cannot be used as Automatic Breakdown
Solution: Create a Manual Breakdown -> make a Breakdown Source -> Use it as Automatic Breakdown with PA Script as Mapping
firstly, the solution is mentioned below in:
- How can I create a breakdown by task type on the T… - ServiceNow Community
- Or search by title: How can I create a breakdown by task type on the Time Card table?
- However if you are new, like me, this might be not straight forward.
- Thus credits goes to @Vincent Loffel1
Step 1: Define the manual breakdown
Step 2: Make the Manual Breakdown a new Breakdown Source
- Set the Facts table: Manual Breakdown
- Field: Sys ID
- Conditions Breakdown is : Your manual breakdown
Step 3: Create the PA Script, which will be used later in the Automatic Breakdown
Go to page: pa_scripts_list.do
And create a new script
- Define the fact table and the field accordingly, on the String field
- Code
//The Sys ID of the Manual Breakdown
var breakdown = 'SysID of the Manual Breakdown'
//Category of the CMDB
var value = current.category;
var sysID = '';
if (value && value != '') {
var gr = new GlideRecord('pa_manual_breakdowns');
gr.addQuery('breakdown', breakdown);
gr.addQuery('value', value);
gr.query();
if (gr.next()) {
//Return the SysID of the entry on the manual breakdown
sysID = gr.getValue('sys_id');
}
}
sysID || '';
Step 4: Create an Automatic Breakdown - Using that Breakdown Source & Create Mapping using the PA Script Above.
Create an Automatic Breakdown
- Use the Breakdown Source created above
Create the Breakdown Mapping to the Fact Table and using the above PA Script
Step 5: Add the Automatic breakdown to the Indicator as usual
Step 6: Re-run you the Indicator Job as usual
Done
Now the Indicator and the "String field" Breakdown can be used in the Analytics Visualization.
- Labels:
-
Performance Analytics
