For Each Data Pill is always undefined inside Script

PaKe
Kilo Sage

Hey,

 

I want to set a flow variable via script with the value from a "For Each"-Item. When I use the data pill I retrieve the correct value. When I want to use a script I always retrive "undefined".

The "Set Flow Variables"-Action is inside the "For Each"-Loop.

 

Where is my problem?

 

PaKe_0-1748597825828.pngPaKe_1-1748597858774.png

 

19 REPLIES 19

Did not work

Then log a case mate. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@PaKe 

are you sure the column name is correct?

that column is present?

are you running in global scope or custom scope?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I run it inside a custom scope. Do you think that there is a different read access via script?

 

I think the problem is that I dont have cross scope privileges to the child tables. Is it possible to define all by once?

PaKe_0-1748604079453.png