Power Apps  

Concurrency in Power Apps

Concurrency in Power Apps refers to how multiple operations run at the same time to improve performance and reduce waiting time, especially when dealing with data sources like SharePoint, Dataverse, SQL, or APIs.

Why Concurrency Matters

Without concurrency, Power Apps executes actions one-by-one (sequentially), which can make apps slow. With concurrency, independent actions run in parallel, making apps:

  • Faster

  • More responsive

  • More scalable

The Concurrent() Function

Power Apps provides a built-in function specifically for this:

Concurrent(
    ClearCollect(colCustomers, Customers),
    ClearCollect(colOrders, Orders),
    ClearCollect(colProducts, Products)
)

All three data calls run at the same time instead of waiting for each other.

Use Cases

  • Loading multiple data sources on App OnStart

  • Refreshing several lists together

  • Calling multiple independent Patch or Collect operations

Real Example: App OnStart Optimization

Sequential (Slow)

ClearCollect(colProjects, Projects);
ClearCollect(colTasks, Tasks);
ClearCollect(colUsers, Users);

Concurrent (Fast)

Concurrent(
    ClearCollect(colProjects, Projects),
    ClearCollect(colTasks, Tasks),
    ClearCollect(colUsers, Users)
)

When NOT to Use Concurrency

Avoid Concurrent() when:

  • One action depends on the result of another

  • You need guaranteed order of execution

Incorrect example

Concurrent(
   Set(varID, Patch(List, Defaults(List), {Title:"Test"}).ID),
   Patch(List2, Defaults(List2), {RefID: varID})
)

Here, VarID may not be ready yet.

Concurrency vs Parallel Actions (Power Automate)

Power AppsPower Automate
Concurrent() functionParallel branches
Improves UI performanceImproves workflow execution

Concurrency Control (Data Conflicts)

Power Apps also deals with record-level concurrency:

  • If two users edit the same record, last save may overwrite the previous one

  • Use RowVersion / ETag (Dataverse/SharePoint) to prevent overwrite

Example pattern

If(
    ThisItem.'@odata.etag' <> LookUp(MyList, ID=ThisItem.ID).'@odata.etag',
    Notify("Record modified by another user", NotificationType.Error),
    Patch(...)
)

Best Practices

  • Use Concurrent() only for independent actions

  • Prefer it in App.OnStart or Screen.OnVisible

  • Limit heavy Patch operations inside concurrency

  • Log errors using IfError() inside Concurrent

Example

Concurrent(
    IfError(ClearCollect(colA, ListA), Notify("ListA failed")),
    IfError(ClearCollect(colB, ListB), Notify("ListB failed"))
)

Performance Tip

Use Concurrent + With() for cleaner and faster code:

With(
   {src: Filter(Projects, Status="Active")},
   Concurrent(
       ClearCollect(colProj, src),
       ClearCollect(colBackup, src)
   )
)

Summary

Concurrency in Power Apps helps you:

  • Run multiple operations in parallel

  • Improve app performance

  • Reduce load times

  • Handle multi-user conflicts safely