Introduction
In this article, we will see how we can use the Patch function in Power Apps for bulk operations like bulk Edit, bulk Delete with respect to our database. I will explain with an example in which I have taken SharePoint List as a database.
Before reading this article, please go through my previous articles in which I explained the steps to create a Project and the Phases of the Project using various input fields. Also explained on Expand and Collapse Multiple Phases together by using Nested Gallery,
- Project Management Application (Create Project) Using PowerApps and SharePoint Online
- Display Data In Power Apps Gallery And Update The Input Of That Gallery In SharePoint List
- Multiple Expand And Collapse Rows In A Power Apps Canvas App Gallery
Let’s start with a scenario in which I am going to explain how to edit, update or delete multiple tasks of the Task gallery along with this I will explain the floating concept in Power Apps which will help for better architecture in the design of the Application.
Demonstration
The below image displays Project Information in which the left pane is showing the basic information of a project like Project Name, Project Description, and Project Manager. I have already explained all this how to save all the information from the customized form in the Share Point list using the Patch function and how to extract all the information in Power Apps Gallery. The links are given above please refer for better understanding.
The Right pane displays a nested gallery, the Parent gallery displays the Phases and the child gallery displays the Tasks under the Project. I have created some default tasks under every phase using the concept explained in the previous article “Phases created under the Project”. So, here all the tasks are by default assigned to Project Manager, Task Start date is same with Project Start Date and Task End Date is same with Project End Date and the Task Status is “Not Started”.

When we click on the Edit button,
Actions
- The edit button will be changed to Cancel
- Check Box will be added in every task row
- Task Name, Task Start date, Task End date, Task Assignee, Task Status, Save and Delete button will appear.
- We will be able to edit, update or delete single or multiple tasks at one click

Steps to achieve the Design
Edit Button
OnSelect: UpdateContext({Edittaskgallery:!Edittaskgallery}) // Edittaskgallery is a variable declared to enable edit
Text: If(Edittaskgallery, "Cancel", "Edit")// If Edit is enabled the Text of button will be Cancel as it will work Disable Edit
Set the visible property of all controls to Edittaskgallery // By this when the edit button will be clicked this column values will appear.

- Edit the task gallery and select the checkbox and set the visible property to Edittaskgallery
- When the column values will visible we need to push the Phase and Task Gallery down, for this we need to set the “Y” and the “Height” property of the Parent gallery(Phase Gallery)
Y: If(Edittaskgallery,180, 100)

Height: If(Edittaskgallery,580, 647)

Let us take one more scenario here, in the above image when Edit is enabled the labels of the controls are disturbed, so let’s arrange them by setting X property of those labels.
Here I have set the X property of all labels and the labels are arranged just above the controls. This is also a concept of floating, by using this we need not create duplicate labels in the screen which will enhance the performance of the application.

Development of this Nested Gallery and its properties
On Visible property of the Screen.
Created a Collection to extract all the Phases of a particular Project,
ClearCollect(
colPhaseunderProject,
Filter(
Project_Phase_Info,
ProjectID.Value = Projectlist.Selected.ID
)
);
Created a collection to extract all the tasks under a particular phase
ClearCollect(
colTasksunderPhase,
Filter(
Task_List,
ProjectID.Value = Projectlist.Selected.ID
)
)
Now I will add these collections to the Items property of the Gallery.
Items of Phase Gallery: colPhaseunderProject

Select the Child gallery - Task Gallery
Items property of Task gallery: Filter(colTasksunderPhase,PhaseName.Id= ThisItem.ID) // This will bring the tasks which are under a particular Phase.

Bulk Update: Scenario 1
Now in this task list, all the tasks are Starting from June 1, 2021, and ending on September 30, 2021, and assigned to PRAJNYA SATAPATHY and all are in Not Started.
I have added a check box in every Task row and one check box on the top to select all the tasks.
Action
When we will on Check the check box those tasks will be selected for edit. Save button is for saving the Information into the Share Point List and the Delete button is to delete the tasks from the SharePoint List.
Select the checkbox inside the gallery.
Oncheck: Collect(colBulkUpdate,ThisItem)
















Fabiola AguileraPosted Oct 21, 2025, 4:10 AM
This does not work as it updates every single item the sharepoint list rather than items selected via checkbox.
PrajnyaPosted Jun 14, 2021, 2:23 PM
https://www.youtube.com/watch?v=btjwMuBy--w