Hi @Poweruser32490,
The issue is caused by SharePoint delegation.
Your first Filter() is delegable because it uses equality (=) conditions, so SharePoint filters the data on the server.
However, in your second filter you're using the in operator:
SearchBox.Text in HM.DisplayName ||
SearchBox.Text in DL.DisplayName ||
SearchBox.Text in FirstName ||
SearchBox.Text in Title ||
SearchBox.Text in 'Id' ||
SearchBox.Text in 'Created By'.DisplayName
The in operator is not delegable for SharePoint. When no filters are selected, Power Apps only searches the first 2,000 records (or your app's configured Data row limit), so records beyond that are never evaluated.
Update your formula
If a Starts With search is acceptable, replace the search portion with StartsWith() (delegable for SharePoint text columns):
With(
{
_activerequests:
Filter(
'Datasource',
(IsBlank('Process Type CB'.Selected.Value) || ChoiceProcessType.Value = 'Process Type CB'.Selected.Value) &&
(IsBlank('Employee Type CB'.Selected.Value) || ChoiceResourceType.Value = 'Employee Type CB'.Selected.Value) &&
(IsBlank('Region CB'.Selected.Title) || Region_New = 'Region CB'.Selected.Title)
)
},
SortByColumns(
Filter(
_activerequests,
IsBlank(SearchBox.Text) ||
StartsWith(Title, SearchBox.Text) ||
StartsWith(FirstName, SearchBox.Text)
),
varsortcolumn,
varsortdirection
)
)
Note: StartsWith() is delegable only for text columns. Person fields such as HM.DisplayName, DL.DisplayName, and 'Created By'.DisplayName are still not fully delegable for SharePoint.
If your business requirement is a contains search across all 5,000+ records (not just "starts with"), SharePoint cannot perform that delegably. In that case, you should consider:
- Using Dataverse or SQL Server for delegable search.
- Using a Power Automate flow to perform the search on the server.
- Creating a dedicated searchable text column if that fits your scenario.
I hope this helps! If this resolves your issue, please consider marking it as the Verified Answer so it can help others facing the same problem.
Best regards,
Pankaj Jangid (OyePanky)
📧 Mail: oyepanky@gmail.com
▶️ YouTube: https://www.youtube.com/@oyepanky
🌐 Blogs & More: https://www.dialforit.com