PA Breakdown Script

vineetk_195
Tera Contributor

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

22 REPLIES 22

Yes johan tried adding logs and tracking same, but I think its not at all running the script.



Thank You


Vineet Kumar


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


Sorry use getCI() instead of getIncidentCategory(). Copy and paste gone wrong lol


Hi John,



Tried with .toString() function but still result is the same. Script throws the same error.



Thank You


Vinnet Kumar


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();