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 Apps / Filter Sharepoint base...
Power Apps
Answered

Filter Sharepoint based on Last ID

(0) ShareShare
ReportReport
Posted on by 17

Good day, 

My issue is the following :

I have an app in which people can create and manage Claims, the Data sources of this app are SharePoint List. Each claims is assigned an ID based on the latest SharePoint ID + 1, however due to the fact that you can only pull 2000 rows max from SharePoint everything after a certain point become the same claim number.

My plan was to first filter the Sharepoint List by ID in order to have the latest ID on top of the list to allow PowerApps to read it without having to pull 2000+ rows to find the latest ID. I just can't seem to make it work for some reason.

Find attached the portion of the code that is currently working but cause issues with the claim number every time we reach 2000+ rows.
"main" is the name of the SharePoint List I need to filter.
The red square shows which part of the code needs to be amended with the "filter" or "sort" or "sortbycolumns".






ClaimsApp Code.JPGClaimsApp Code focus.JPG

Categories:
I have the same question (0)
  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Try this instead of filter:

     

    First(Sort(main, ID, Descending)).ID + 1

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Leo_Lepiez Profile Picture
    17 on at

    It is indeed working, thank you for your help, I've been struggling with this for some time now.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard