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 Apps
Answered

ID number

(0) ShareShare
ReportReport
Posted on by

Hey, I need little help from someone who knows these things little better. I am building an app, that user puts values in, on couple of field, and then tey move to google shetts spreadsheet, and they get an id pased on the previous number. Everything else works fine, but  when I delete one of the records, lets say one from the middle, the id numbers after the deleted one stay the same. For example, lets say that we have id numbers 15,16,17. And we delete the 16. After that, it says 15,17. And i want it to be 15,16. Can someone help me on how to do that? Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous 

    Please try the following (change table, column names as applicable),

    ForAll(Filter(yourtable, ID>IDoftheDelectedrecord),
    	Update(yourTable, ThisRecord, {ID:ThisRecord.ID-1})
    )

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • Community Power Platform Member Profile Picture
    on at

    Thanks @CNT . Looks like it might work, but for some reason I haven`t got it to work yet. But I will try again

  • Community Power Platform Member Profile Picture
    on at

    @CNT Finally got it working. Had to change your answer just a little bit.

    ForAll(Filter(yourtable, ID>IDoftheDelectedrecord),
    Patch(yourTable, ThisRecord, {ID:ThisRecord.ID-1})
    )

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous Gald it works!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard