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!
Solved! Go to Solution.
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.
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.