web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Reset Autonumber counter
Power Apps
Unanswered

Reset Autonumber counter

(0) ShareShare
ReportReport
Posted on by

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
    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,338 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard