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 / Strange issue with Las...
Power Apps
Unanswered

Strange issue with Last(SharePointList).ID result

(0) ShareShare
ReportReport
Posted on by 96

Hello Team,

 

I am facing strange issue with Last(SharePointList).ID result. It was working fine till 150 items. I am supposed to receive 151 for Last(SharePointList).ID result, if there are already 150 items in my list. But some times getting very old item ID. For instance getting 100 as Last(SharePointList).ID even though there are 150 items

 

Please advise

 

Thanks,

Praveen

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @PRAVEENZNMD 

    You are better off using 

     

     

     

    First(Sort(SharePointList, ID, Descending)).ID

     

     

     

    By using the above, you can avoid any future Delegation and/or Data-Row limit issues.

     

    There could be a number of reasons why your original formula isn't working as expected.

     

    EDIT

    Note, the above formula will throw a delegation warning but you can ignore this because the formula is getting the First record. If you want to not see that delegation warning (but not remove the delegation issue itself) you can use this formula instead:

     

     

     

    With(
     {
     wFirst: Sort(SharePointList, ID, Descending)
     },
     First(wFirst).ID
    )

     

     

  • PRAVEENZNMD Profile Picture
    96 on at

    hi @Anonymous ,

     

    We are still facing issues with Last ID generation. We tried below formula 

     

    With(
    {
    wFirst: Sort(SharePointList, ID, Descending)
    },
    First(wFirst).ID
    )

     

    We got Last ID as 335, when we have item with ID 338. So strange

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @PRAVEENZNMD 

    That is odd. There's nothing wrong with the formula, it works fine on my lists.

     

    My guess is there's something causing the issue on the SharePoint end such as some sort of permission limitations. Maybe there's an item level restriction on the last 3 items?

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 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard