Hi Experts,
I have a powerapps that is looking at a SharePoint list and it's searching the records using the below code. The SharePoint list has now exceeded 2000 records and we aren't able to search for anything past those 2000, can you advise how I can adapt my code so that it will be able to search past 2000 records please?
Filter(QualityPortal,
StartsWith(ID, SharePointSearch_3.Text) ||
StartsWith('Created By'.DisplayName, SharePointSearch_3.Text) ||
StartsWith(Status, SharePointSearch_3.Text) ||
StartsWith(Classification, SharePointSearch_3.Text) ||
StartsWith(JobNumber, SharePointSearch_3.Text) ||
StartsWith('Cause Category', SharePointSearch_3.Text) ||
StartsWith(Function, SharePointSearch_3.Text)
)
Thanks in advance!
Solved! Go to Solution.
StartsWith('Created By'.DisplayName, SharePointSearch_3.Text)
Created By is a complex type column Person or Group means the StartsWith is not Delegable in that scenario if you manage to replace this with another column or parameter for Your search. You should be able to go above 2000 records
To make sure, remove this part of the Filter and Look If You go above 2000 records
ID column in SharePoint is alo partial Delegable and can cause an issue if you using it in Filter that way
StartsWith('Created By'.DisplayName, SharePointSearch_3.Text)
Created By is a complex type column Person or Group means the StartsWith is not Delegable in that scenario if you manage to replace this with another column or parameter for Your search. You should be able to go above 2000 records
To make sure, remove this part of the Filter and Look If You go above 2000 records
ID column in SharePoint is alo partial Delegable and can cause an issue if you using it in Filter that way
Hey @Dave-ITMan,
As @SebS said, those two portions of your code are not entirely delegable, however, you can wrap an inner delegable filter inside of another filter that is non-delegable, that way any searches involving the delegable inner items will surface, and your non-delegable section will remain non-delegable but won't affect the rest of your filtering. We also add an IsBlank check against the searchbox to stop any additional unnecessary calls being made when the searchbox is empty:
Filter(
Filter(QualityPortal,
IsBlank(SharePointSearch_3.Text) ||
StartsWith(Status, SharePointSearch_3.Text) ||
StartsWith(Classification, SharePointSearch_3.Text) ||
StartsWith(JobNumber, SharePointSearch_3.Text) ||
StartsWith('Cause Category', SharePointSearch_3.Text) ||
StartsWith(Function, SharePointSearch_3.Text)
),
IsBlank(SharePointSearch_3.Text) ||
StartsWith(ID, SharePointSearch_3.Text) ||
StartsWith('Created By'.DisplayName, SharePointSearch_3.Text)
)
Try using that and searching for one of the inner items above 2000, then for the outer items above 2000
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @iAm_ManCat and @SebS
Thanks for your responses, would be great if I could still search using those fields, unfortunately @iAm_ManCat suggestion didn't work, I was still unable to search past the 2000 records but removing the created by and ID fields allowed me to search.
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |