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 / App does not pull the ...
Power Apps
Answered

App does not pull the last number from the Excel worksheet column

(0) ShareShare
ReportReport
Posted on by 7

Hello community,

When the App I created is opened I want it to generate a unique follow-up number from an excel worksheet called Complaints on OneDrive. The code for this in Default = Last(Complaints).ID+1 

Normally this works fine but at some moments I have the issue that the App generate numbers starting with 1 even when there are already numbers in the worksheet ID column. 

Could this be a connectivity issue? How can I stop the App from creating a new number that is already in the column?

Thanks in advance. Eric 

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Eric_S69 

    Your problem is that Last() is not delegatable in Excel.  Set the Default to First(Sort(Complaints, ID, Descending)).ID+1

    First() is also not delegatable but it doesn't matter since Sort() is delegatable. 

  • Eric_S69 Profile Picture
    7 on at

    @Drrickryp  Thanks a lot. I've changed the formula to your advice.

    I trust the issue is resolved now, time will tell. 🤞

  • Eric_S69 Profile Picture
    7 on at

    @Drrickryp 

    I have tested your solution and it didn't solve the issue, it even got worse. Each time the count starts at 99 and added 1, so each new report/number is 100. I have reset the old formula and added a delay in the App, that way the possibility for connection issues is minimized. If you see any other formula solution I'm willing to try them.

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 Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard