web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint Get Items -...
Power Automate
Unanswered

Sharepoint Get Items - Not Returning All Records

(0) ShareShare
ReportReport
Posted on by 8

Hi guys,

 

I have a Get Items step that is pulling data from a list in Sharepoint that has greater than 5k records. In the "Filter Query" section of Get Items, I'm querying for any records with a "Targeted End Date" greater than or equal to today. It should be pulling back 54 records, but I'm only seeing 20 records. What am I doing wrong?

 

Gesbos1_1-1679786953773.png

 

 

Categories:
I have the same question (3)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    By default, Get items only returns the first 100 items. In your case you should do two things since you have more than 5000 items.

     

    Set Top Count to 5000. This will return the first 5000 items.

     

    grantjenkins_0-1679789741088.png

     

    Go into Settings and turn on Pagination, then set a Threshold to something greater than the number of items you expect to have over the next few years. If you have around 6000 items in your list and expect there to be around 10000 items within the next few years, then set the Threshold to 15000 (as an example). 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.

     

    grantjenkins_1-1679789754264.png

     

    grantjenkins_2-1679789769387.png

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @Gesbos1 

    @grantjenkins is correct in that Get items will return just 100 items by default.  The filter query filters before the records are returned to you, so while you should turn on pagination and set the threshold, that is not your issue.

    Can you replace the utcNow() expression with the following and try again:

    utcNow('yyyy-MM-dd')

     

     

  • Gesbos1 Profile Picture
    8 on at

    Thanks Grant. I get this error when i set Top to 5000 and pagination to 30000:

    Gesbos1_0-1679828278669.png

     

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Gesbos1 

     

    I think it is related to license issue

     

    Refer this post 

    https://powerusers.microsoft.com/t5/Building-Flows/Sharepoint-Get-Items-error-pagination-policy/td-p/1621693

     

    Hope this helps you !

     

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @Gesbos1 

    Please remove the entry in top count.  Set the threshold to no more than 5000 and try again with my suggestion above.

     

  • batmanMon Profile Picture
    202 on at

    @grantjenkins  you are a star!

  • dperez13 Profile Picture
    432 on at

    my question is , if i have 1000 files and i do get files. if i do filter query = ID = 1. will get files still bring back 100 or 1000 files, or will it only bring the items im filtering for?

     

    so if i have thousands of files, but if i only need 3 and i do filter query to only grab those 3, is it still going to bring back 100 in the json body?

  • Chris911 Profile Picture
    2 on at

    I've wasted hours trying to figure out why my "Get Items" was only returning 100 items.

     

    PowerAutomate clearly states in Top Count that "Total number of entries to retrieve (default = all)" ALL. Not 100. ALL.

    How does Microsoft let a mistake like that get out?

    Capture.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard