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 / Do action properties i...
Power Apps
Answered

Do action properties in components run asynchronously?

(1) ShareShare
ReportReport
Posted on by 49
Here is an example;
 
I created a component to store some actions so that I can make the functions simpler and easier to read.
 
 
Here is an action that creates a collection:
 
 
 
And here is another one, which calls the first action to refresh the collection (the base dataset) and run some queries on it.
 
 
 
Will the second row of this code be executed after the first one is fully completed?
 
Or will the second one start right after starting to run the first line?
 
image (1).png
image (2).png
I have the same question (0)
  • Verified answer
    deepakmehta13a Profile Picture
    369 on at
    Hi @403 ,

     

    Yes, the second row will execute after the first one is fully completed. Here is exactly how Power Apps handles this under the hood:

    Sequential Execution

    In Power Fx, whenever you separate commands with a semicolon (;), you are telling the app to run them sequentially. When your app triggers Action11, the execution flow looks like this:


    1. Power Apps sees Self.Action1();

    2. It jumps over to Action1 and starts the ClearCollect(Collection1, Locations) command

    3. It waits for the data request to Locations to finish downloading and for Collection1 to be fully populated

    4. Only after that background data operation signals that it is 100% complete will the app return to Action11

    5. Finally, it executes the second line: ClearCollect(Result, Filter(Collection1, Name = "East"));

    Because of this sequential behavior, your Result collection is guaranteed to be filtering against the fully refreshed data in Collection1.

     

    When would they run at the same time?

    Formulas only run simultaneously if you explicitly wrap them in a Concurrent() function. For example:

     

    Concurrent(
        Self.Action1(),
        ClearCollect(Result, Filter(Collection1, Name = "East"))
    )
    
     

    In this case, both would start at the exact same time, which would cause your second line to filter an empty or outdated collection. Since you are using the standard semicolon, you are perfectly safe!

     

    When to use Concurrency

    You should use the Concurrent function when you have multiple data requests or formulas that have no dependency on each other. This allows Power Apps to execute them at the same time, which is the easiest way to significantly speed up your app's performance.

     

    🔗 Concurrent function - Power Platform | Microsoft Learn

     

    By the way, using a Component to store reusable "helper" actions like this is a fantastic architectural pattern to keep your code clean and readable.


    If this helps resolve your issue, please consider marking the response as Verified so it can help others facing a similar scenario. 


    If you found this helpful, you can also click “Yes” on “Was this reply helpful?” or give it a Like. 

  • 403 Profile Picture
    49 on at
    Thank you for the response, @deepakmehta13a! :)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard