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 / Delete list items base...
Power Apps
Answered

Delete list items based on filtered gallery

(0) ShareShare
ReportReport
Posted on by 64

I have a gallery on my app showing items from a SP List, and I would like to delete items from that same list based on filtered items shown on gallery.

I set a search box to filter gallery items based on a specific column from the list (Column1).

Now I'm trying to delete all items remained on the gallery after the filter is applied, based on another column of that SP List (Column2).

Here is what I'm doing:

 

Gallery.Items = Filter('SP List', searchQuery in Column1)

Button.OnSelect = Remove('SP List', Filter('SP List', Gallery.AllItems.Column2 = Column2))

 

I realized that is not possible to do "Gallery.AllItems.Column2 = Column2" since I'm comparing a table with a single row.

I tried "Gallery.Selected.Column2 = Column2" and it deletes a single record each time I push the button.

 

Any suggestion on how to do delete all items at the same time?

Thank you!

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @gasilva8 

    Please consider changing your Formula to the following:

    Remove('SP List', Filter(Gallery.AllItems, Column2 = Column2).ID)

     

    Remove takes a table of records with primary keys (in this case ID) and will remove all that are in that table.

     

    I hope this is helpful for you.

  • gasilva8 Profile Picture
    64 on at

    Hey @RandyHayes.

    Thank you so much!! That worked perfectly.

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard