Skip to main content

Fixed: Delegation Warning. The "CountRows" Operation Is Not Supported by This Connector

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

Counting SharePoint items with CountRows(Filter(...)) puts a yellow triangle on the screen: Delegation warning. The highlighted part of this formula might not work correctly on large data sets. The "CountRows" operation is not supported by this connector. SharePoint can't count, so the count happens in the app, on at most 500 items. The fix is to ask SharePoint a question it can answer.

The Warning​

In the Career Development Plan app, the My Team screen lists a manager's direct reports. My first version showed how many responses each person had waiting for review, with a count added to each row (How to Add a Column with AddColumns):

My Team Screen → OnVisible (warning)
UpdateContext({locIsLoading: true});
UpdateContext(
{
locMyTeam: AddColumns(
MyDirectReports As member,
PendingCount,
CountRows(
Filter(
CompetencyResponses,
EmployeeId = member.id && Status.Value = StatusPending
)
)
)
}
);
UpdateContext({locIsLoading: false})

A yellow wavy line appeared under CountRows(, with this message:

The expanded formula bar with the OnVisible formula, a yellow wavy line under CountRows( and a hover box reading Delegation warning. The highlighted part of this formula might not work correctly on large data sets. The "CountRows" operation is not supported by this connector., with View Problem and No quick fixes available

Warning
Delegation warning. The highlighted part of this formula might not work correctly on large data sets. The "CountRows" operation is not supported by this connector.
View Problem (⌥F8) No quick fixes available

The canvas showed a yellow triangle next to the screen:

The My team screen on the canvas with a yellow warning triangle at its top-left corner

What the Documentation Says​

The Filter itself is fine: = on a text column and on a Choice column's .Value, joined with &&, are all delegable to SharePoint (SharePoint delegation). The counting isn't:

  • Microsoft's article on small data payloads says SharePoint doesn't support CountRows or CountIf, so Power Apps downloads a limited number of rows, 500 by default, and counts them in the app (Small data payloads).
  • The delegation overview adds that when any part of a query can't be delegated, Power Apps doesn't delegate any of it, and works on the first 500 records (Delegation overview).

So the count is only reliable while the list stays small. CompetencyResponses gets an item for every person and competency, so it will pass 500.

What Live Monitor Showed​

To see the warning at run time, I opened Live monitor (... → Advanced tools → Open live monitor; How to Use Live Monitor in Power Apps) and opened the My Team screen in preview. Live monitor logged a getRowsCount event and a Delegation event for CountRows, with a warning:

Live monitor's event list with four events: UserAction Select, Network getRows Success, Network getRowsCount Success and Delegation CountRows Warning

Live monitor: Result info
getRowsCount: Requested 500 rows. Received 1 rows.
Delegation CountRows: Formula not delegated. 1 rows scanned.

The event's details explained that the formula might not work correctly on large data sets and that the data row limit for non-delegable queries is 500. That matches the documentation.

Don't Hide It with With​

A common suggestion online is to wrap the filter in With, such as With({pending: Filter(...)}, CountRows(pending)), so the warning goes away. Microsoft's delegation article explains why it would: With, UpdateContext and Set keep results in in-memory tables, which can't be delegated, and you don't see delegation warnings for them (Delegation and collections). The 500-item limit is still there; you just can't see it. That isn't a fix, so I didn't use it.

The Fix: Ask a Question SharePoint Can Answer​

The manager doesn't need the number on this screen, only whether someone has something waiting. LookUp answers that, and it's delegable to SharePoint. IsBlank then checks whether it found anything (How to Check If a Record Exists in Power Apps):

My Team Screen → OnVisible
UpdateContext({locIsLoading: true});
UpdateContext(
{
locMyTeam: AddColumns(
MyDirectReports As member,
HasPending,
!IsBlank(
LookUp(
CompetencyResponses,
EmployeeId = member.id && Status.Value = StatusPending
)
)
)
}
);
UpdateContext({locIsLoading: false})

! and IsBlank work on the record that LookUp returns, after the query, so they don't stop the query from being delegated. The underline and the triangle were gone:

The formula bar with the new OnVisible formula and no underline, and the My team screen on the canvas without a warning triangle

Each row now shows a Waiting for review badge when HasPending is true. The exact list is on the person's own screen, which loads only their responses into a variable with a delegable Filter. Anything you do with that variable afterwards, such as filtering or counting it, runs in the app and doesn't need delegation.

Common Mistakes​

MistakeWhat happensDo this instead
Ignoring the warning because the list is small todayWrong counts later, with no errorFix it while it's easy
Wrapping the query in WithThe warning disappears, the limit doesn'tUse a delegable query
Raising the data row limit to 2,000Works until the list outgrows it, and slows the appDelegate instead
Using CountIf insteadAlso not delegable to SharePointUse LookUp for yes/no, or load one person's items

Troubleshooting​

SymptomLikely causeFix
The warning moves to LookUpPart of the condition isn't delegable, such as <> on textCheck the condition against Microsoft's SharePoint table
No warning, but the badge never showsThe status text doesn't match the Choice valueCompare StatusPending with the column's choices

FAQ​

Can SharePoint count items at all?​

Not through a canvas app's delegation. Microsoft's Dataverse table lists CountRows and CountIf as delegable, with some conditions; SharePoint's table doesn't list them.

Is the LookUp version slower?​

It runs one small query per direct report, which is fine for a team. For one person's full list, the Team Member screen loads their responses once.

Conclusion​

The "CountRows" operation is not supported by this connector means SharePoint can't count, so the app counts at most 500 items. Don't hide it with With. Ask a question SharePoint can answer, such as !IsBlank(LookUp(...)), and count only data that's already in the app.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.