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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Items - Order By d...
Power Automate
Unanswered

Get Items - Order By doesn't return all items.

(0) ShareShare
ReportReport
Posted on by 14

Hi, I have a Flow that does a Get Items to get all the Items from a SharePoint List and put them in a CSV file.  I have an Order By clause of Title that seems to remove some Items.  

 

The Title field is all Peoples names that get filled in from a canvas app, so they're all the same for each entry the user makes.  When I do the Order By, there are 196 items and if I take it away there are 204.

 

Really can't figure out what might be happening, anyone any clue what I should check?

 

Thanks...

 

John

 

 

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at
    Re: Get Items - Order By doesn't return all items.

    Can you go to the Settings option on the action and activate paging and include page size as 500 and then run the flow?

     

    PrasadAthalye_0-1614734036312.png

     

  • sharepoint_john Profile Picture
    14 on at
    Re: Get Items - Order By doesn't return all items.

    Hi @PrasadAthalye 

     

    Thanks for your reply.  This is currently set at 1000 and as I mentioned, there are 204 items when no Order By clause and 8 missing when it's added, giving 196 so it doesn't sound like a threshold limit.

     

    Still haven't figured it out.

     

    Thanks...

     

    John

  • PrasadAthalye Profile Picture
    on at
    Re: Get Items - Order By doesn't return all items.

    Can you please post your flow picture with getitems expanded?

  • sharepoint_john Profile Picture
    14 on at
    Re: Get Items - Order By doesn't return all items.

    2021-03-04 09_18_12-Edit your flow _ Power Automate.png

    2021-03-04 09_39_35-Edit your flow _ Power Automate.png

    Hi @PrasadAthalye .

     

    Here you go.  As I said, the only thing in it is the Order By clause.  In the list there are 204 items, if I remove the Order By I get all 204, if I add it in I get 196 items.

     

    Seems really bizarre.

     

    John

  • PrasadAthalye Profile Picture
    on at
    Re: Get Items - Order By doesn't return all items.

    Understood. Thanks for uploading a picture. Can you check if there are any items with the blank title?

     

    Also, can you please create an OOTB view with the same sort option and add a count of ID  and see what does count show?

  • SoerenH Profile Picture
    4 on at
    Re: Get Items - Order By doesn't return all items.

    Hi, I had the same problem as you did.

    Flow called Get items with an order by Expression.

    In some instances, it just "ignored" some items in the SP List

     

    Did some testing:

    Flow calls Get items, once with order by and once without.

    SoerenH_1-1683570807139.png


    The output-length got me baffled:
    In my case, there was a difference of almost 30%!

    I have no idea why SP does that.

    SoerenH_2-1683570866237.png

     

    How I fixed it:
    I removed the SP Get Items Order By Expression.

    This results in an unordered JSON Object.

     

    You can use the "Sort" Function in a compose action

    This is just as performant and produces the same result.

    SoerenH_0-1683570717582.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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard