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 / Default ID Calculation
Power Apps
Answered

Default ID Calculation

(0) ShareShare
ReportReport
Posted on by 36

Hi All,

I've got a New Item form in my application that uses a SQL Express database.  I am trying to set the default property on the ID field so that it will be the Top ID + 1.  Does anyone know how to do this?  The data type is Number but I'm having issues pulling the top ID.  Does this need to be done through a collection? Any help is appreciated!

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

    It would be smarter to use an AutoIncreament type for ID since it would automatically put the ID number in the database and you would not have to manually set it.

     

    However, if you want to mannually get the last ID ou can use Last() function.

    Last('[dbo].[YourDatabase]').ID

     

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

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard