Filter SharePoint items with multiple and conditions, will it fail if the first condition return more than 5k items

john john Pter 1,325 Reputation points
2025-11-12T10:47:16.43+00:00

I have this query against SharePoint list:-

User's image

where i indexed all the related fields using separate indexes (where i am already using the 20 indexes allowed for us)

User's image

now my question is; will the above Filter fail if the first condition (EndDate1 ge VStart) return more than 5k items?? If the answer is yes, then how i can overcome this?

Thanks

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jayden-P 12,400 Reputation points Microsoft External Staff Moderator
    2025-11-12T11:38:50.4866667+00:00

    Hi @john john Pter

    Thank you for posting your question in the Microsoft Q&A forum.

    Based on my research, the query will not fail even if the first condition returns more than 5000 results if you have enabled pagination and set threshold to maximum (100000).

    Go into Settings and turn on Pagination, then set a Threshold to something greater than the number of items you expect to have.

    When you set Pagination on, it will return the Top Count in batches. So, if your Top Count is 5000, it will return the first 5000, then the next 5000, and so on until all items are returned or it reaches your Threshold.

    User's image

    Some related articles that might help:

    Solved: Sharepoint Get Items - Not Returning All Records

    Get Over 5000 Items From A SharePoint List In Power Automate

    Note: Microsoft is providing this information as a convenience to you. These sites are not controlled by Microsoft, and Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please ensure that you fully understand the risks before using any suggestions from the above link.

    I hope this information helps.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.