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 / Why Max(Autonumber) fr...
Power Apps
Answered

Why Max(Autonumber) from Dataverse doesn't update

(0) ShareShare
ReportReport
Posted on by 255

I have Autonumber column in Dataverse and I use that column as a base for an Rownumber field. For testing I have done a button, where I set a new variable for Max(Rownumber) in Dataverse table. The variable works fine when I open the app and press the button, but when I submit new records to the Dataverse table, and press the button after that, the variable value doesn't update.

 

I wonder why?

 

I have also tried Last() function, but the result is the same.

Categories:
  • Finnair Profile Picture
    255 on at

    Update:

     

    If I update Dataverse connection, the button works fine. Next thing is to include Dataverse connection refresh in the button...

  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @Finnair ,

     

    You can try to refresh the data source first under the OnSelect property of bottom, and then use the Max() or Last() formula.

    Refresh(EmployeeContacts);Set(Var,Last(EmployeeContacts).ID)

    vdezhilimsft_0-1678695197801.png

     

    Best Regards,

    Dezhi

     

     

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard