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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard