cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
utkarshdubeyg
Frequent Visitor

Empty array receive when triggering UI flow from another flow

When I edit UI flow, a Selenium IDE open there I create an array,

execute script | return [] | Array

After that in a loop I insert value in it,

execute script | ${Array}.push({Name: ${Name}, Age: ${Age}}); return ${Array}; | Array

 When I execute this from Selenium IDE it give me proper output on echo, like name: John & age: 25.

 

But when I trigger the UI flow from another flow it is providing blank output.

 

{
"Array": [],
"y": 4,
"x": 3,
"ranNum": 2000,
"win5548": "xxxxxxxxxx",
"root": "xxxxxxxxxx",
"Name": "John",
"Age": "25",
"out": "[]"
}

Surprise thing is this other variables have their value. 🤔
I also used JSON.stringify

execute script | return JSON.stringify(${Array}); | out

But the result is same, as mentioned above.

 

If possible Please help me to fix this issue on ASAP.

 

1 ACCEPTED SOLUTION

Accepted Solutions
utkarshdubeyg
Frequent Visitor

I managed to solve it myself,

 

execute script | return [${Array}, {Name: ${Name}, Age: ${Age}}] | Array

 

But it will return very complex array which you will need to handle by yourself. I converted it to JSON string and after that I got valuable data. 

Hope it will help someone.

Regards

View solution in original post

1 REPLY 1
utkarshdubeyg
Frequent Visitor

I managed to solve it myself,

 

execute script | return [${Array}, {Name: ${Name}, Age: ${Age}}] | Array

 

But it will return very complex array which you will need to handle by yourself. I converted it to JSON string and after that I got valuable data. 

Hope it will help someone.

Regards

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,351)