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

ID number

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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
    Microsoft Employee 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
    Microsoft Employee 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 421

#2
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 278 Super User 2026 Season 1

Last 30 days Overall leaderboard