Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Get Items - Top count not working

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

i'm struggling with the Top count function.

I want to get an item in a sharepoint list with the highest number.

My attempt was to use  Get items function, order the retrieved items descending and set Top count to 1.

The list contains 173 items right now, so i set the pagination to 200.

As a result, i get a number of 173 items, the Top count has been ignored.

But if i turn the Pagination off, i get 1 as a result, but missing 73 items.

I don't get it, what am i doing wrong here?

 

  • SM-20081418-0 Profile Picture
    54 on at
    Re: Get Items - Top count not working

    omg, the column, i tried to sort was formatted as string. 🙄

    But confusing, that it works for 100 items...

     

    thanks aanyway

     

  • Mister_Shaik Profile Picture
    1,006 on at
    Re: Get Items - Top count not working

    Hi @SteMatu ,

     

    Are you using the SharePoint "Get Items" action?

     

    If yes, then the order by should work as long as the column you're using to order is number type in your case.

     

    1. flow.PNG

    Using the above configuration, I'm sorting the list items by descending for ID column. Then the TopCount is limiting the entry to 1 item. I've tested it on a list with 5000+ items, and it returns the correct value.

     

    You just need to replace the "ID" with the number column that you want.

     

    Hope this helps 🙂


    Kind Regards,

    Shaik Sha
    ________________________________________________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1