HOW TO DELETE MULTIPLE RECORDS IN POWERAPPS

 To Delete multiple records in powerapps.

I have used gallery here. You can also use DataTable. Add a label inside the gallery and rename it as lblSelect and set it’s property text = If(chkDeleteItems.Value=true,true,false). Next, insert the checkbox inside the gallery and rename it. I have renamed it as chkDeleteItems. Now set the checkbox property “OnCheck” to true and “OnUncheck” to “false” . Now insert a button and rename it to “Delete” and “OnSelect” properties add this

ForAll(

      RenameColumns(Filter(Gallery1_2.AllItems, chkDeleteItems.Value = true), "ID", "ID1"),

      Remove(test123, LookUp(test123, ID = ID1))

)

No alt text provided for this image


Here Gallery1_2. All Items is the name of the Gallery I have used,

test123 – Is the sharepoint list.

No alt text provided for this image

You can set the lblSelect properties visible = false. After selecting, click on the Delete button and the item will be deleted.

 

TO DELETE SINGLE RECORD.

No alt text provided for this image

Insert the button or the Trash icon and on the icon add “OnSelect” - Remove(test123,Gallery1_1.Selected). Your items will be deleted.

Comments