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

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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 335 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 248

Last 30 days Overall leaderboard