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 / Reset Autonumber counter
Power Apps
Answered

Reset Autonumber counter

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

1) I have a autonumber column in a Entity "Save". And I created 3 records in it. I deleted all the records but the autonumber column starts from 4. How can I reset the counter so that it should start from 1?

2) Suppose a user deletes a record having value as 2 in autonumber field. then suppose user enters new data then how can I allow user to take available autonumber, in this case it will be 2.

 

Please help @EricRegnier 

@HSheild 

@jlindstrom 

I have the same question (0)
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @Anonymous,

    Unfortunately out-of-the-box that’s the standard behavior and the seed cannot be reset to the number of records remaining in the system. This is by design, actually by Azure SQL/SQL Server. Imagine for example, record 1, 2, 3 created, and then 2 removed. Record 3 stays as 3 and not reset to 2. Later record 4 gets created, it is set to 4 and not 2. That would actually not only be confusing but extra work for the system to reprocess the auto numbers every time a record gets deleted. It would also be very error prone to users and external references to these auto numbers. Ex. An invoice number (auto number) is generated, then later that actually invoice number changes...not good! Once set, they are meant to stay immutable.

    Hope this clarifies...

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @EricRegnier ,

    Can I link autonumber field of two entities? Suppose I have table A and table B then If I insert record in table A then the autonumber field will be 1. Then if I inserts record in table B then there the autnumber field should be 2. Is this possible?  

  • Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at

    The autonumber field is just a text field and holds no logic in it itself (just holds the outcome of the sequence generated - and can be overwritten after it has been populated without impacting the next sequence generation).   When you configure the autonumber it sets up a sequence (not visible to you), you can reset the 'seed' of the sequence but this is a configuration (but it can be done via a .Net plugin) not really something you would do when someone deletes a record etc.  The sequence is per Entity/Table not able to handle complex logic etc.

  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Not automatically as records get inserted/deleted, but you can reset the seed manually (for example in Dev environment) in the Maker portal:

    EricRegnier_0-1620773882746.png

     

  • souzaths Profile Picture
    6 on at

    Is there another way to do it as I don't have access to the Dev section? 

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @souzaths, what do you mean by the dev section? The maker portal (make.powerapps.com) is the default way but there's also a tool in the XrmToolBox to manage autonumbers: https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.AutoNumManager/ 

    Hope this helps!
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard