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 / Troubleshooting Delete...
Power Apps
Unanswered

Troubleshooting Delete Row from Gallery Button

(0) ShareShare
ReportReport
Posted on by 239
Hi,

I have a gallery (TravelGallery) that links with a Dataverse Table (Travel Reimbursements) and I have added my trashcan icon to delete that row but it isn't working. Thoughts?

 

 

Remove('Travel Reimbursements',ThisItem)

 

 

Screenshot 2023-03-07 125633.png

Categories:
I have the same question (0)
  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Hi @gfeldhake 

     

    Your formula is correct.  Could there be some other issue going on? 

     

    For further testing, you can set your TemplateFill to something like this: If(ThisItem.IsSelected, Color.WhiteSmoke, Color.White).  That way you can confirm your "ThisItem" is truly selected in your Gallery.

  • GF-02121351-0 Profile Picture
    239 on at

    @Rusk, I changed the color to DimGrey so you could see it better in the screenshot. 

     

    Screenshot 2023-03-07 143123.png

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    So you definitely have your item selected, so that's not the issue.  I don't know honestly... it looks correct to me.  A similar formula for your trash can icon OnSelect would be 

    RemoveIf('Travel Reimbursements',ID = ThisItem.ID)

    When you test both of those, are there any kind of errors? 

    Alternatively, what if you pull your table into a collection for testing and then use that collection in your gallery?  Does it work then?  

  • GF-02121351-0 Profile Picture
    239 on at

    @Rusk I tried the other formula and got this error: 

    Screenshot 2023-03-07 154631.png

    So I tried it with "ID" replaced with TravelID and that didn't work either. 

     

    I am not sure what you mean by pulling the data into a collection. Can you explain that? 

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Got it... the "ID" is just a column name, apologies for not explaining that better.  You'd use there the name of whatever your main identifier column is, maybe "Title" or whatever it would be.  

     

    If you add a button for testing, to pull the data into a collection you would use this on the OnSelect property:

     

     

    ClearCollect(colTest,'Travel Reimbursements')

     

     

    or something like that.  colTest would be the name of the collection, and 'Travel Reimbursements' is your data source.  After  pressing the button, you can go to "Collections" to see the first 5 items and confirm it worked. 

     

    Rusk_0-1678223470717.png

     

    Then change the Items in your Gallery to colTest.  Then, test your Remove formula again.

    Remove(colTest,ThisItem)

     

    If the item is deleted correctly, then we know there is some issue with your data source.  OR, if we can't pull it into a collection, then we also know something else is going on.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 617

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard