PA Breakdown Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 07:31 AM
Hello All,
I have configured an Indicator on Database view. Need to configure breakdown on an field which is available on base table, so as to acheive same I have written a script to get breakdown mapping between indicator facts table and field from base table.
But the issue which I have come across is, while using the filed from database view in the Breakdown mapping script I get an error " Not all references of "current" are passed in by "arguments" script".
Any suggestions / help would be great!
Thank You
Vineet Kumar
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 06:10 AM
Yes johan tried adding logs and tracking same, but I think its not at all running the script.
Thank You
Vineet Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 06:21 AM
I'd try this:
function getCI() {
var value = current.prb_cmdb_ci.toString();
var sysID = '';
if (value && value!= '') {
var gr = new GlideRecord('cmdb_ci_appl');
gr.addQuery('sys_id',value);
gr.query();
if (gr.next()) {
sysID = gr.field;
}
}
sysID || '';
}
getIncidentCategory();
I'm only reccomending a function because that's how I've always done it and it works for me. The main thing here I think could be the toString(). I'd try making that change first
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 06:22 AM
Sorry use getCI() instead of getIncidentCategory(). Copy and paste gone wrong lol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 06:43 AM
Hi John,
Tried with .toString() function but still result is the same. Script throws the same error.
Thank You
Vinnet Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 06:54 AM
This is my last guess lol. If it doesn't work I'm all out of answers.
function getCI() {
var value = current.prb_cmdb_ci.toString();
if (value != '') {
var gr = new GlideRecord('cmdb_ci_appl');
gr.addQuery('sys_id', value);
gr.query();
while (gr.next()) {
return gr.field;
}
}
}
getCI();