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 / Delegation issues and ...
Power Apps
Suggested Answer

Delegation issues and how to best overcome them without re-writing everything!!

(0) ShareShare
ReportReport
Posted on by 183

I’m building a Canvas app using SharePoint lists and I’m running into a large number of delegation warnings, particularly with formulas like CountRows(Filter(...)) for per-contact counts, and First(SortByColumns(Filter(...))) to get the latest related record (e.g. latest interaction or follow-up). I also previously used AddColumns(...) in gallery Items to bring in these values, which caused further delegation issues.

I understand why these are non-delegable, but I’m trying to determine the best overall design approach for a scalable solution as my lists grow beyond 2,000+ records. Is it generally recommended to store summary values (e.g. latest interaction, counts) directly on the main record (e.g. Contact), or are there better patterns within Power Apps/SharePoint to handle these scenarios without relying heavily on Power Automate?

I’d really appreciate advice on best practice for handling these common patterns (counts, latest related records, cross-list summaries) in a way that avoids delegation issues and performs well long-term.

Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    1,546 on at
    Core Design Principle in Canvas Apps
    • Never compute aggregates in the Canvas App for large datasets
    Instead:
    • Precompute (write-time)
    • Avoid compute-on-read (runtime)
    The best and correct approach is:
    • Store summary values (counts, latest records) on the parent record (Contact)
    • Maintain them using Power Automate (write-time updates)
    • Keep Canvas App read-only for aggregates
    • Avoid runtime aggregation completely
    To build a scalable, delegation-safe Power Apps solution on SharePoint.
    • Shift logic from UI → data layer
    • Denormalize + precompute + keep app simple
    • Avoid runtime aggregation
    This is the only scalable approach with SharePoint.
  • Vish WR Profile Picture
    1,245 on at
     
    As a best practice don't do the calculations during the runtime always do the time at the time  writing the data.
    Example
    When the data saved using auto calculate value or use power automate to calculate and store and use the summary for the reporting 
  • Suggested answer
    WarrenBelz Profile Picture
    155,111 Most Valuable Professional on at
    Firstly, you might have a read of this blog of mine on using the With() statement to manage Delegation. If your case CountRows is not a Delegable function, however if the ultimate row count is less that your (up to 2,000) Data Row Limit, then upi can do this
    With(
       {
          _Data:
          Filter(
             DataSouce,
             YourDelegableFilterHere
          )
       },
       CountRows(_Data)
    )
    However once you get beyond 2,000 records, you will find a solution in the same blog above for up to 4,000 records and another for all records, except that one (if you are using SharePoint) needs a unique numeric identifier other then the ID.
     
    There is also a Power Automate returning the records - send the filter string to the Flow and return the value from a Compose action
    length(body('Get_items')?['value'])
    I can elaborate on this if required.
     
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    155,111 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn   

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 502

#2
Vish WR Profile Picture

Vish WR 454

#3
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

Last 30 days Overall leaderboard