Home >Tips >Power Apps >Remove alla or selected items kalmstrom.com site map icon Site map  

Remove SharePoint Items from Canvas App

Remove All or Selected Items

Microsoft Power Apps iconIn the previous demo, Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, showed how to add a button that removes one selected item from the app and the SharePoint list.

In the demo below, Peter creates two new buttons: one that removes all items and one that removes seleted items.

The app Peter uses in the demo is the same as in earlier demos about the recurring tasks app, but the aim here is just to show the formulas for removal of SharePoint all or selected items from an app.

Remove all items

Peter adds a Clear button and creates a formula that loops through all items in a gallery (galTasksToDo) and for each loop removes the current item: ForAll(galTasksToDo.AllItems,Remove('Tasks To Do', ThisRecord).

Remove selected items

Peter creates a new screen and connects its gallery (galItemsToRemove) to the Tasks To Do SharePoint list. On that screen he adds a checkbox at each item and a Remove Selected button.

The button formula loops through all items in the gallery and for each item looks if the box is checked. If that is true, the formula removes the item:
ForAll(galItemsToRemove.AllItems,If(ThisRecord.Checkbox1.Value=true,Remove('Tasks To Do', ThisRecord))).




Learn more





back icon next icon
Products Buy FAQ Services Tips Books Contact About Us Tools

Security and integrity

Copyright  Kalmstrom Enterprises AB  All rights reserved