How to Delete SharePoint List Item from Power Apps Gallery?

This Microsoft Power Apps tutorial will teach us how to remove a SharePoint list item from the Power Apps Gallery. Then, we will discuss the Remove() function to remove the SharePoint list item from the Power Apps Gallery control.

Additionally, we will see how to use the RemoveIf() function to remove a specific SharePoint list item from the Power Apps Gallery.

Delete a SharePoint list item from Power Apps Gallery

Here, we will discuss how to delete a SharePoint list item from the Power Apps gallery.

Example:

I have a SharePoint Online list, i.e., [Issue Traker] and this list contains the below fields.

Column NameData Type
Issue TitleDefault single line of text column
Product NameA single line of text column
How to delete sharepoint list item from power apps gallery

In Power Apps, there is a Gallery control that is connected to the SharePoint list. When a user removes an item from the Power Apps gallery, it will also be removed from the SharePoint list.

Refer to the below screenshot:

How to delete sharepoint list item from power apps gallery control

To achieve the above example, follow the below steps.

1. Open Power Apps -> Create Power Apps Canvas app -> Connect to the SharePoint list to the app like below.

Delete sharepoint list item from power apps gallery

2. On the Power Apps Screen -> Insert a Gallery control and set its Items property as:

Items = 'Issue Tracker'

Where,

  • ‘Issue Tracker’ = SharePoint Online List
Delete sharepoint list item from power apps gallery control

3. Insert a Trash icon inside the gallery control and set its OnSelect property code like below.

OnSelect = Remove('Issue Tracker',ThisItem)

Where,

  • Remove() = This Power Apps Remove() function is used to remove a specific record or records from a data source
  • ‘Issue Tracker’ = SharePoint List
  • ThisItem = We can select a specific item that we want to remove from the SharePoint list
Delete a sharepoint list item from power apps gallery

4. Save, Publish, and Preview the app. Whenever the user clicks on the Trash icon, it will remove the SharePoint list item from the Power Apps gallery, as in the screenshot below.

Delete a sharepoint list item from power apps gallery control

This is how to remove a SharePoint list item from the Power Apps gallery.

Remove Specific SharePoint List Item from Power Apps Gallery

Next, we will see how to remove a specific SharePoint list item from the Power Apps Gallery using the RemoveIF() function.

Example:

I will also use the SharePoint list [Issue Traker] for this example. I have Gallery control in Power Apps, having the SharePoint list records.

Now, I want to remove specific SharePoint items based on the value, i.e., [Laptop] from Power Apps gallery control, as in the screenshot below.

Remove sharepoint list item from power apps gallery

To do so, follow the below-mentioned steps. Such as:

1. On the Power Apps Screen -> Insert a Button control (Remove Laptop) and set its OnSelect property as:

OnSelect = RemoveIf(
    'Issue Tracker',
    'Product Name' = "Laptop"
)

Where,

  • RemoveIf() = This function is used to remove a specific item or items based on the condition
  • ‘Product Name’ = “Laptop”= It is a logical condition to remove specific items based on the product name
How to remove sharepoint list item from power apps gallery control

2. Now, click the button control to remove the “Laptop” related issues from the Power Apps gallery to the SharePoint list.

Remove sharepoint list item from power apps gallery control

3. Similarly, you can remove specific SharePoint items based on respective product names, i.e., [Remove Mobile] and [Remove Outlook]. To do so, follow the below button control’s OnSelect property:

OnSelect = RemoveIf(
    'Issue Tracker',
    'Product Name' = "Mobile"
)

RemoveIf(
    'Issue Tracker',
    'Product Name' = "Outlook"
)

This is how to specific SharePoint items from Power Apps Gallery.

Conclusion

Whenever you want to remove a SharePoint list item from a Power Apps Gallery, you can use a Remove() or RemoveIf() function to delete a specific item.

I trust this Power Apps tutorial taught in detail information about how to delete a SharePoint list item from Power Apps Gallery control and Remove a Specific SharePoint item from Power Apps Gallery using RemoveIf().

You may also like:

>