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 / Remove a record from t...
Power Apps
Unanswered

Remove a record from the Gallery

(0) ShareShare
ReportReport
Posted on by 228

Hello PowerApps Experts!

 

I have a simple request.

 

I have a Gallery (source is from Sharepoint List) and a checkbox next to each record within the gallery. 

 

I want the user to able to check multiple records and then click a button on the screen to delete the selected items from the Gallery if they are not happy with the data. 

 

Can you please offer assistance? I have attacked the 'Remove' function from many angles but cannot get it working.

 

Many thanks !! 

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at
    deleted...
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    If you try to remove all the items that are selected from the SharePoint list directly, as the items are being removed the gallery will be refreshed (since the data source is changed), so you may have some issues. What you can do instead is to first collect all the items that you want to remove in a local collection, then go through all those items (using the ForAll function) and remove them from the SharePoint list.

    For example, I have a list called 'deleteme20200202' which is the source of the items of my gallery (Gallery1). Inside the gallery I have a checkbox (Checkbox1) and outside a 'Remove selected' button, with the following OnSelect expression:

    ClearCollect(itemsToRemove, Filter(Gallery1.AllItems, Checkbox1.Value))
    ;ForAll(itemsToRemove, Remove(deleteme20200202, { ID: ID }))

    For SharePoint lists, we can use the ID column which is present in all elements which is a unique identifier for the item. If you have a different data source, you may have to find another way to identify the item (such as using a LookUp).

    Hope this helps!

  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    Galleries don't actually contain items, they just display a filtered list of items from a back end data source or collection.  So you can't really remove them from the gallery without removing them from the data source (the SharePoint List).  All you can do is setup a filter that will filter those records out of the records that are displayed in the gallery.

  • Semi Profile Picture
    32 on at

    Hello @Pstork1 

    Please how do we go about this.

  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    This post is two years old.  Please post your question as a new post.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard