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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Get Items - Top count not working

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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?

 

Categories:
I have the same question (0)
  • Mister_Shaik Profile Picture
    1,008 on at

    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.

  • SM-20081418-0 Profile Picture
    54 on at

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

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

     

    thanks aanyway

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard