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:
  • 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 330

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 123

Last 30 days Overall leaderboard