Hey all, Sorry for such a long post.
I work in manufacturing, and I am coming from WinAutomation, so I am not too familiar with the ins and outs of Power Automate. I am hoping this community can help me and give me guidance on simplifying or reworking steps in my flow to make it easily understandable and more efficient.
As you can see in the first picture >> a PDF triggers the flow >> get the contents of the PDF >> Call a child flow. The child flow extracts the contents of an XML file that is in a different directory but associated with the PDF that triggered the flow. It returns JSON that provides details about the production page and each image that is on the page.
Picture_1
As highlighted in the orange rectangle in the first image, there is an image on the page where the name starts with “Nested Wood”. See, I have learned to nest images inside of other images to make better use of our material and the software I am using also creates an XML file for those nested images.
Below, I filter all the normal images on the page from the “Stamp Info” array and store them in the Image List Variable.
Then, I filter the same array but only if it contains the string “Nested Wood”.Picture_2
Just like at the beginning of the flow, I have to send each of the “Nested Wood” images through the same Child flow to extract the XML content.
Picture_3
Then I loop through each image within each “Nested Wood” and add that Image to the Image List Variable.
Picture_4
After those steps I have all the info I need, and I will add that info to a share point list next.
Before I do that though I am here to see if I can cut down on actions or if there are any other functions within expressions that I may use to tidy up the process.
I am sorry for such a long post, but I wanted to be detailed enough so that it could be understood.
Thanks in advance for the help and having me in the community.
Solved! Go to Solution.
Hi @Laser_Tim_88 ,
You are on track, just in last loop use the compose action to put the data instead of adding to list. When you are doing the compose inside loop it is internally adding to an array. This array can be accessed outside foreach loop.
All you have to do is add one more compose outside foreach loop and use expression Outputs('Compose{}'). Please note 'Compose{}' is a variable you defined in Foreach loop. Plus if you want to speed up last loop you can right click on the loop and select settings and choose concurrency of your desired choice.
Thanks
Hi @Laser_Tim_88 ,
You are on track, just in last loop use the compose action to put the data instead of adding to list. When you are doing the compose inside loop it is internally adding to an array. This array can be accessed outside foreach loop.
All you have to do is add one more compose outside foreach loop and use expression Outputs('Compose{}'). Please note 'Compose{}' is a variable you defined in Foreach loop. Plus if you want to speed up last loop you can right click on the loop and select settings and choose concurrency of your desired choice.
Thanks
Thank you for the reply and suggestion about the compose action instead of the Append to List. I wasn't aware that being in a loop that the compose would automatically append to the array! I will also be taking advantage of the concurrency settings.
Thanks again!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
76 | |
27 | |
18 | |
16 | |
15 |
User | Count |
---|---|
138 | |
44 | |
32 | |
32 | |
29 |