Power Apps  

How to Use the Concurrent Function in Microsoft Power Apps

Introduction

Concurrency in Microsoft Power Apps means running multiple operations at the same time instead of one after another.

It is mainly used to improve app performance and reduce loading time by executing independent tasks in parallel using the Concurrent() function.

Example: Loading multiple data sources or collections simultaneously. 🚀

Example concept:

  • Without concurrency → tasks run one by one

  • With concurrency → tasks run at the same time

1️⃣ What is Concurrency in Power Apps?

Normally, formulas run sequentially:

ClearCollect(Products, ProductsTable);
ClearCollect(Customers, CustomersTable);
ClearCollect(Orders, OrdersTable);

Here:

  • Products loads first

  • then Customers

  • then Orders

Total loading time = sum of all three operations.

2️⃣ Using the Concurrency Function

Power Apps provides the Concurrent() function to run tasks in parallel.

Example:

Concurrent(
    ClearCollect(Products, ProductsTable),
    ClearCollect(Customers, CustomersTable),
    ClearCollect(Orders, OrdersTable)
)

Now:

  • All three collections load at the same time.

Result:

  • App loads faster

  • Better user experience

3️⃣ When to Use Concurrency

Use Concurrent() when operations are independent.

Good examples:

  • Loading multiple collections

  • Calling multiple APIs

  • Getting data from different SharePoint/Dataverse tables

Example:

Concurrent(
    Set(UserProfile, Office365Users.MyProfile()),
    ClearCollect(ProjectList, Projects),
    ClearCollect(TaskList, Tasks)
)

4️⃣ When NOT to Use Concurrency

Avoid it when operations depend on each other.

Bad example:

Concurrent(
    Set(varA, 10),
    Set(varB, varA + 5)   // varA may not be set yet
)

Because:

  • varB may execute before varA finishes.

5️⃣ Real-World Example (App OnStart)

Many developers optimize App.OnStart like this:

Concurrent(
    ClearCollect(colEmployees, Employees),
    ClearCollect(colDepartments, Departments),
    ClearCollect(colProjects, Projects),
    ClearCollect(colLocations, Locations)
)

This reduces startup time significantly.

6️⃣ Benefits of Concurrency

✔ Faster app startup

✔ Better performance

✔ Efficient data loading

✔ Improved user experience

Quick Tip:

Microsoft recommends using Concurrent() mainly in App.OnStart or screen loading when retrieving multiple datasets.

Conclusion

Concurrency in Microsoft Power Apps helps improve app performance by allowing multiple independent tasks to run simultaneously using the Concurrent() function. This reduces loading time and makes apps faster and more efficient.