QuestionQ398

Create and configure Power Apps

You are developing a canvas app that realtors use to identify neighbors of properties that are for sale.

The OnStart property contains the following code:

ClearCollect(collectNeighborList, Filter(NeighborList, Status = `Active"));  
ClearCollect(collectRealtorList,CompanyList);  
ClearCollect(collectRegions, RegionList)  

The app is performing more slowly than expected.

You need to resolve the issue.

What should you do?

  • A Replace all instances of the ClearCollect method with the connect method.
  • B Replace the existing code segment with the following code segment Concurrent (ClearCollect(collectNeighborList, Filter(NeighborList, Status = ג€Activeג€)), ClearCollect(collectRealtorList,CompanyList),ClearCollect(collectRegions, RegionList))
  • C Replace the existing code segment with the following code segment: ClearCollect(collectNeighborList, Filter(NeighborList, Status = ג€Activeג€)); Concurrent(ClearCollect(collectRealtorList,CompanyList)); Concurrent(ClearCollect(collectRegions, RegionList))
Explanation

Power Fx evaluates formulas chained with semicolons sequentially. Concurrent evaluates multiple independent formulas at the same time and is specifically recommended in an app’s OnStart property to reduce data-loading time. The three ClearCollect operations have no dependency on one another, so putting them together in a single Concurrent call reduces the startup wait to approximately the longest individual data request.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!