Delegation limits in the Fabrikam inspection canvas app
Fabrikam keeps 62,000 inspection records in a SharePoint list. A canvas app shows them in a gallery whose Items property is Filter(Inspections, StartsWith(Title, TextSearchBox.Text) || Region.Value in RegionFilter.SelectedItems.Value). OnStart runs ClearCollect(colAll, Inspections). Quality inspectors report that the gallery shows only a subset of records - roughly 500 in some regions - searches miss records added this week, and the app takes about 25 seconds to start on mobile. Users must search by inspection title, filter by one or more regions, and open a record to edit it. The list structure will not change this year, and the mobile devices are low-end Android handsets.
1. Explain why the gallery shows only a subset of records and why startup is slow, using the specific formulas above.
Read the worked answer
Both symptoms are delegation, not permissions.
- SharePoint delegation supports
=,!=,StartsWith,>,<, andAnd/Orbetween delegable predicates - butinagainst a multi-select or choice column is not delegable. - Because the
inexpression is non-delegable, the entireFilterbecomes non-delegable. Power Apps processes only the first N rows (the data row limit, 500 by default and at most 2,000) and filters locally, so the gallery silently truncates. There is a warning marker on the Items property - that is the diagnostic. ClearCollect(colAll, Inspections)has the same ceiling: it pulls the first 500/2,000 rows only, so newly added records never arrive, and the local collection plus its memory cost is what makes start-up take 25 seconds on low-end devices.
Rule of thumb: if the delegation warning is present, the count shown is a lie, not a bug.
2. Rewrite the data-loading and filtering approach so it is delegable or explicitly bounded.
Read the worked answer
Remove the non-delegable parts before optimising anything else.
- Delete
ClearCollect(colAll, Inspections)from OnStart. There is no reason to cache 62,000 rows on a handset; fetch on demand. - Make the region filter single-select (dropdown) so equality is delegable:
Filter(
Inspections,
StartsWith(Title, TextSearchBox.Text),
IsBlank(ddRegion.Selected.Value) || Region.Value = ddRegion.Selected.Value
)
- If multi-region selection is a hard requirement, convert it into a bounded delegable query: on change of the region picker, run one
ClearCollectper selected region (Filter(Inspections, Region.Value = "North"), then"South", ...) and accept that each call returns at most 2,000 rows - show a banner when the cap is hit. Alternatively keep multi-select client-side but pre-filter to a delegable subset (e.g., current week) first. - Use
ShowColumns/Distincton the gallery source and a separateLookUpwhen a record is opened, so the gallery does not carry every column. - Set the data row limit deliberately and document it; do not rely on the default 500.
3. The business now wants dashboards counting inspections per region per month and record-level restrictions so a contractor sees only their own site. What do you recommend and why?
Read the worked answer
Move the data to Microsoft Dataverse; SharePoint has reached its ceiling.
Signals that this app has outgrown the list:
- Aggregation: counts per region per month over 62,000+ rows cannot be delegated to SharePoint - you would be pulling and counting locally. Dataverse supports
CountRows(Filter(...))with delegation and rollup columns, so dashboards become cheap. - Record-level security: SharePoint permissions are list/library-level and item-level permission management at this volume is unmanageable. Dataverse gives business units, owner teams, and access teams per record.
- Volume and growth: SharePoint delegation caps at 2,000 rows per query; any real search over 62,000 records will keep hitting it.
Migration path that keeps the canvas app:
- Create the table in Dataverse with typed columns (Region as a choice, Title as text, dates as date-only).
- Migrate data once with a scheduled cloud flow or Dataflows.
- Repoint the app's data source - the canvas app and delegation behaviour survive almost unchanged, but now
StartsWith,=, and filters delegate fully. - Model record access with business units and owner teams instead of SharePoint item permissions.
Keep SharePoint for what it is good at (document libraries); stop using it as the app's transaction database.