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-15-2017 12:42 PM
I've seen this issue a few times while trying to configure PA Scripts. Almost every time I believe the issue had to do with the fields that were selected underneath the facts table. Any fields I used, I had to select from the list. Then I just attached them to a variable before I did anything and I used the variables in my script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 01:09 PM
Thank you John,
I have used the same technique, where I have attached field value to a variable and then used same in the script, but still facing this issue.
Below is the script I have used:
var value = current.prb_cmdb_ci; // prb_cmdb_ci is the field from facts table i.e. derived from Database view
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 || '';
I am not sure why do I get this error?
Thank You
Vineet Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 01:27 PM
In all of my PA scripts I'm returning something. I think you need to return sysID at the end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 01:36 PM
Thank you John for the response.
I am returning sysID at end of my script as mentioned in my previous comments:
sysid || '';
Thank You
Vineet Kumar