PA - Error during JavaScript evaluation: Not all references of "current" are passed in by "arguments" script:

Wade Clairmont
Tera Guru

Hey all,

Really really new to PA, so stay with me!

I am trying to collect all requested items in the last 30 days, and assign them to bucket groups by Requested Item.Name.  

I have created

Indicator, automated indicator - pretty straight forward

Breakdown source - bucket group (2 items)

Breakdown - mapping is                 FACT TABLE:sc_req_item             FIELD:sc_req_item.cat_item                         SCRIPT:RequestedItem.Grouping                       SCRIPTED:true

How ever, when I attempt to run the collection, I receive the looks like infamous "Error during JavaScript evaluation: Not all references of "current" are passed in by "arguments" script:"

error on my script.

PA group.png

Any help would be greatly appreciated.

Thanks in advance.

1 ACCEPTED SOLUTION

pieter_goris
ServiceNow Employee
ServiceNow Employee

Hi Wade,



the error indicates that you did not list the fields that you use in your script in the source section of the script. Based on your screenshot you might want to try it like this:


test _ ServiceNow 2016-12-02 02-02-07.png


in the list view of the scripts it shows not the label but the column name of the field, like:


Scripts _ ServiceNow 2016-12-02 02-05-36.png


From your script I think that you want the 'item' field.



When you set the field, just move the field to the right, no need to expand:


test _ ServiceNow 2016-12-02 02-09-11.png



On the breakdown mapping you don't have to set the field, you are using a script instead.



Hope this helps, cheers,


Pieter


View solution in original post

3 REPLIES 3

pieter_goris
ServiceNow Employee
ServiceNow Employee

Hi Wade,



the error indicates that you did not list the fields that you use in your script in the source section of the script. Based on your screenshot you might want to try it like this:


test _ ServiceNow 2016-12-02 02-02-07.png


in the list view of the scripts it shows not the label but the column name of the field, like:


Scripts _ ServiceNow 2016-12-02 02-05-36.png


From your script I think that you want the 'item' field.



When you set the field, just move the field to the right, no need to expand:


test _ ServiceNow 2016-12-02 02-09-11.png



On the breakdown mapping you don't have to set the field, you are using a script instead.



Hope this helps, cheers,


Pieter


Slava Savitsky
Giga Sage

Try selecting "Requested Item" rather than "Requested Item.Name" in the "Fields" field.


yogesh15dd
Tera Guru

I have added the fact table fields, even then i get the same error, any help mates?

 

find_real_file.png