cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tutankh
Level: Powered On

Apply to each loops, variables, and parallelism

I have a flow which triggers from an email receipt that contains an HTML table.

The goal of the flow is to take the html table, convert it to JSON, then loop through each object, validate data, and send out http requests for certain entries.

 

The basic process for this is to:

 

  1. Get the headers from the [0] index position
  2. create an array for all json objects
  3. For each object where the index > 0, ---
    1. create a blank json object
    2. create an array with items from each 'cell'
    3. loop through the array of index numbers of the header row
      1. create a property:value pair
      2. add the property:value pair to the json object
    4. Add the json object to the 'all objects' array
  4. Do stuff with the json array

My issue is that due to certain restrictions, my loops seem to be taking a long time to complete for the amount of objects I have. Specifically, I can't instantiate a variable within a loop, and I can't update a variable with a value that includes the original variable (ex. set variables('AA') = union(variables('AA'), json{"Property":"1})

 

I checked, just to be certain, and running in parallel causes all kinds of mayhem since the variable objects are global and get updated and pulled as such.

 

Anyone have any thoughts here? Or am I stuck at present with slowness for the sake of treating data accurately?

 

Any thoughts for getting around this?

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 273 members 4,253 guests
Please welcome our newest community members: