web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Long running flow- usi...
Power Apps
Answered

Long running flow- using local variables in Apply to each to enable concurency control

(0) ShareShare
ReportReport
Posted on by 518 Moderator

Hello,

inside an canvas app i have a flow where the user imports data from a csv file.

As there are multiple loouk columns to be populated i need variables to hold the guid (getting guid by "List row" with the right filter ).

 

Already for a hundred lines in the csv file this takes so long that the fow times out.

If i use concurency control for the "Apply to each loop" than it is at least a little bit faster.

But the problem is that the value of the veriables is not kept constant within one loop.

 

Is there a way to define "local" variables inside the "Apply to each" loop?

 

Or is there a way to get some kind of unique number for the iteration, so that i could store the data in a global array?   

Categories:
  • Verified answer
    MissingLink Profile Picture
    236 on at

    If you are using a database (like SQL) then import your data to a staging table first and then do the lookups using a either a Query, View or Stored Procedure to be able to present the data back in the App.   It will be MUCH faster.

  • SLMR Profile Picture
    518 Moderator on at

    That is a good idea for this kind of task.

    As i use dataverse stored procedures, view or even queries are not available. I dould do it in a next flow.

    Anyway this was only a test with a bigger dataset. Normal user will only import shorter files and for the users in accounting i will use dataflows.

    But i war curiuos if there is a possiblity to use "local" varialbes, as parallel loops may be interesting for other applications. 

    I think i could do it somewhow with arrays and track properties.

    Thansk for your help and a happy new year 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard