cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Laser_Tim_88
Advocate II
Advocate II

Passing a proper array back to Cloud Flow

I am extracting info from an XML file in PAD as seen in Image 1.

For each item in the 'STAMPINFO Node' I am wanting to make each item a custom object also seen in Image 1.

Image_1Image_1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

In each loop I store that Object into a list of objects to pass back to PA.

Though trying to loop through the List in Power Automate I get this Error.

 

Image_2Image_2

 

 

 

 

 

 

 

 

So I am asking, how do I go about making all of my info a proper Array so I may loop through it in PA?

 

Thanks in advance for any guidance !

2 ACCEPTED SOLUTIONS

Accepted Solutions
VJR
Super User
Super User

@Laser_Tim_88 

Since 'Stamp' is a Custom Object have you tried what happens when you use "Convert Custom Object to JSON" action of PAD.

This link is for passing data from Desktop to Cloud but may give you some hints to do something.

 

View solution in original post

Thanks for the Suggestion @VJR 

I ended up making the Custom Object into JSON like you suggested,

though to make it an array I start by making the list before hand and add a '['

Then in each loop I add the Custom object as JSON, next add a ','.

After the loop is done I remove the last ',' and add the closing ']'.

Then once the list is in PA I am able to Parse the JSON and loop through it!

 

Thanks again!

 

And if anyone has a simplified way of making the array in PAD then I am all ears. I`m always trying to cut down on steps!

View solution in original post

2 REPLIES 2
VJR
Super User
Super User

@Laser_Tim_88 

Since 'Stamp' is a Custom Object have you tried what happens when you use "Convert Custom Object to JSON" action of PAD.

This link is for passing data from Desktop to Cloud but may give you some hints to do something.

 

Thanks for the Suggestion @VJR 

I ended up making the Custom Object into JSON like you suggested,

though to make it an array I start by making the list before hand and add a '['

Then in each loop I add the Custom object as JSON, next add a ','.

After the loop is done I remove the last ',' and add the closing ']'.

Then once the list is in PA I am able to Parse the JSON and loop through it!

 

Thanks again!

 

And if anyone has a simplified way of making the array in PAD then I am all ears. I`m always trying to cut down on steps!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,438)