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 / Get Items - Top count ...
Power Automate
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?

 

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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard