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 / Remove record from Dat...
Power Apps
Answered

Remove record from Dataverse tabel

(0) ShareShare
ReportReport
Posted on by 1,066

Hi,

I found this to remove a record from dataverse:

Remove('dbEmpD';ThisItem)

But the code is not correct!

And we use ; instead of , in Holland.

 

Gr, P

 

 

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @PeKi72,

     

    The code seems correct:

    Remove(Datasource; Record)

     

    Please note that:

    • ThisItem should be used within a Gallery control
    • The column schema of ThisItem should match the datasource fully

     

    In case the schema does not match fully, you can use a LookUp function to fetch the correct record:

    Remove(
     'dbEmpD';
     LookUp(DbEmpD; UniqueColumn = ThisItem.UniqueColumn)
    )
    
    //Should you have added some columns within the app (collection / addcolumns) you could use DropColumns to remove those:
    Remove(
     'dbEmpD';
     DropColumns(ThisItem; "Column1InApp")
    )

     

    If this solves your question, would you be so kind as to accept it as a solution.
    Thanks!

  • CU16021406-1 Profile Picture
    1,066 on at

    I found this: 

    UpdateContext({deleteMode:true; deleteCancelled:false; selectedRecord: BrowseGallery1.Selected })
    But i do not need the warning message. How can i leave this out?

    Gr. p
  • LaurensM Profile Picture
    12,516 Moderator on at

    @PeKi72 

     

    The UpdateContext code snippet updates 3 separate local variables - syntax looks ok but this will not delete a record. What would you like to change to / achieve with this code?

  • CU16021406-1 Profile Picture
    1,066 on at

    I use this code to delete records and it works but what i do not need is the confirmation message.

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Do I understand it correctly that this code will open a pop-up where you can confirm the deletion? After confirmation the record is deleted?

     

    If your button is outside the gallery (which could explain the previous ThisItem issue) you can use the following remove code:

    Remove(
     'dbEmpD';
     BrowseGallery1.Selected
    )

     

    Without the variables this should avoid your pop-up (make sure to remove unwanted controls). Should the code above not meet the requirements, would it be possible to provide some screenshots / full code snippets so I can get a better understanding of your app?

  • CU16021406-1 Profile Picture
    1,066 on at

    It works perfect. Thanks. Gr. P

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard