cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
llserra
Helper II
Helper II

Delete record and recover id

Hi

I use id column to a number id from my powerapps ,the problem if i delete a record, also delete this number, and next record add +1 to this column.

How i can when i delete a record and next time that a add a record, use last "real" id?

 

Example:

Add record ,Id: 500

Delete Last Record

Add Record: Id:502

 

Lost Record Id:501 ???

 

Any idea?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @llserra ,

 

I figured a method please see if it suits for you.

 

1\ When deleting the last record, not totally delete it but leave the ID.

 

2\ When adding new records, firstly get the id via last ID +1, then after adding the record successfully, delete all  records that only have ID values.

 

3\ You could also add a column say "Delete", when deleting set this record Delete = 1, then after adding new records delete all records that Delete value = 1.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-jefferni
Community Support
Community Support

Hi @llserra ,

 

I figured a method please see if it suits for you.

 

1\ When deleting the last record, not totally delete it but leave the ID.

 

2\ When adding new records, firstly get the id via last ID +1, then after adding the record successfully, delete all  records that only have ID values.

 

3\ You could also add a column say "Delete", when deleting set this record Delete = 1, then after adding new records delete all records that Delete value = 1.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

 

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

llserra
Helper II
Helper II

Thanks  @v-jeffos 

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,354)