
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2017 08:25 AM
Hello Community!
I hope I used the correct terminology in the Subject Line... 🙂
Here's what I'm hoping to accomplish: I have a breakdown created for a custom field, and that field is in the change_request table. The Automated Indicator is built on the task_ci table because the process that we use at my company dictates that I pull information on Change Requests based on the CIs Affected. Unfortunately, when I go to map the Breakdown, I can't get to the Extended Tables to select that field.
It looks like my solutions are the following three things:
1) Create a Database View. This isn't an option as I don't have access to do that, and our admins don't want to take a performance hit on the system.
2) Add a reference field on the form so that I can traverse it. This isn't an option as, again, I don't have access to do that, and our admins don't want to take a performance hit on the system.
3) Use the scripting capability. This is totally doable, but I'm unsure how to return the information that ServceNow needs.
Is there I resource that I can refer to regarding Performance Analytics scripting, specifically?
Has anyone had the same issue and can maybe share some example code to do this?
Thanks, Community! 🙂
Solved! Go to Solution.
- Labels:
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 09:43 AM
Creating breakdown mapping to extended fields can be done thru scripts
below is a sample script where the "task" field is passed onto the function and it retrieves the incident category from the incident table
you can use this script to then attach to the breakdown mapping
var getIncCat = function (inc)
{
gs.log("Getting info for inc: " + inc);
var gr = new GlideRecord('incident');
gr.get(inc);
return gr.u_incident_category;
};
getIncCat(current.u_task);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 08:56 AM
Michael,
I will see if I can get an answer for you. Thanks.
Regards,
Teena Singh
Customer Experience: UX Strategy and Customer Insights
teena.singh@servicenow.com
ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 09:43 AM
Creating breakdown mapping to extended fields can be done thru scripts
below is a sample script where the "task" field is passed onto the function and it retrieves the incident category from the incident table
you can use this script to then attach to the breakdown mapping
var getIncCat = function (inc)
{
gs.log("Getting info for inc: " + inc);
var gr = new GlideRecord('incident');
gr.get(inc);
return gr.u_incident_category;
};
getIncCat(current.u_task);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2017 01:14 PM
THANK YOU SO MUCH, SOWMYA!
This is exactly what I was looking for! I altered it to fit my needs and it worked beautifully!
I have everything built on the task_ci table, and need a field from the change_request table, and this did the trick:
---------------------------------------------------------------
var getSubPri = function (chg)
{
gs.log("Getting info for chg: " + chg);
var gr = new GlideRecord('change_request');
gr.get(chg);
return gr.u_submission_priority;
};
getSubPri(current.task);
---------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 08:39 AM
Sowmya,
I have a similar requirement. I have my indicators on the incident table and need to break down by a field on the application table. The incident table references the CMDB_CI table and the field I need is on the cmdb_ci_appl table. I understand that a script is necessary but which table do I write this script to and what field? How do I map it to the breakdown source? Very new to PA and trying to learn as much as I can. Thank you in advance for you help.