cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dave-ITMan
Helper IV
Helper IV

Search records over 2000

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SebS
Memorable Member
Memorable Member

@Dave-ITMan 

 

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


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

View solution in original post

3 REPLIES 3
SebS
Memorable Member
Memorable Member

@Dave-ITMan 

 

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


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
iAm_ManCat
Super User
Super User

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!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


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. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,590)