When you build a real Power Apps Canvas app for vendor management, people usually want to make several small changes at once rather than edit one record at a time. They might scan a list of vendors, adjust a few quantities or dates across the grid, and then save everything together when they are ready.
Let’s say a purchasing officer can load this month’s vendors into a collection, update values directly in the gallery, and even add new vendors while all the changes stay safely in memory. With a single click on Save all changes, one Power Apps Patch operation sends the updated records from the collection back to the SharePoint list or other data source in bulk.
In this tutorial, we’ll walk through practical ways to patch a collection in Power Apps, with simple examples and real‑world tips you can use in your apps.
1. Patch a Single Record into a Power Apps Collection
Let’s start with a simple example: you already have a Power Apps Collection of books and want to add a new book record.
Assume you created this Power Apps collection on a button’s OnSelect:
ClearCollect(
colBook,
Table(
{ Name: "Geetanjali", Author: "Rabindra Nath Tagore", Sale: 200 },
{ Name: "Wings of Fire", Author: "A. P. J. Abdul Kalam", Sale: 350 }
)
);
To patch a new book into this collection using another button:
OnSelect =
Patch(
colBook,
Defaults(colBook),
{
Name: "Mind F**ked",
Author: "Anubhav Agrawal",
Sale: 280
}
)
Here’s what is happening:
colBookis the target collection.Defaults(colBook)tells Power Apps you want to create a new record in that collection.- The record
{ }defines the values for the new record.

That’s it! We can see that a new record will be added to the Power Apps collection when the button is clicked.

2. Update a Record in a Power Apps Collection Using LookUp
Very often, you don’t want to add a new record; you want to modify an existing one.
For example, you want to change the author name of the book “Geetanjali” from “Rabindra Nath Tagore” to “R.N.Tagore”.

You can do this with Power Apps Patch + LookUp:
OnSelect =
Patch(
colBook,
LookUp(colBook, Name = "Geetanjali"),
{ Author: "R.N.Tagore" }
)
What’s going on:
LookUp(colBook, Name = "Geetanjali")Returns the record you want to update.- Patch updates only the
Authorfield, keeping all other fields as they are.

Once the Patch button is clicked, we can see that the specified author name will be updated as shown below:

Tip: When your collection has an ID or GUID field, it’s better to LookUp by that instead of a text field like Name, to avoid accidental matches.
3. Patch Multiple Records From a Power Apps Collection to SharePoint
A very common pattern is:
- Load data into a Power Apps collection.
- Let the user modify data in the app.
- Patch all the changes back to SharePoint in one go.
Assume you have a SharePoint list called Vendors List with columns: ID, Title, Order Date, Quantity.

First, you build a collection with multiple records:
OnSelect =
ClearCollect(
ColVendors,
Table(
{ Title: "Aerotek", OrderDate: Date(2022,10,18), Quantity: 180 },
{ Title: "PrideStaff", OrderDate: Date(2022,11,11), Quantity: 135 },
{ Title: "Flexicrew", OrderDate: Date(2022,12,14), Quantity: 105 }
)
);
Then, you patch these records to the SharePoint list:
Patch(
'Vendors List',
ForAll(
Sequence(CountRows(ColVendors)),
Defaults('Vendors List')
),
ColVendors
)

When you check the specified SharePoint list, you’ll see the newly added records as shown below:

This pattern:
- Creates the same number of default records in the list as the number of items in
ColVendors. - Uses the values from
ColVendorsto populate the SharePoint rows. - Lets you push multiple records from a collection into a data source in one go, which is much more efficient than patching row by row.
4. Refresh a Power Apps Collection after Patch (and keep the UI in sync)
Sometimes you patch to the data source and also maintain a local collection for the Power Apps gallery.
A common pattern is:
- The gallery shows a collection, say
ColVendorList. - User selects an item and edits it via a form connected to SharePoint.
- When you submit the form, you also update the collection, which refreshes the gallery immediately.
Your edit form might be bound like this:
Item = ColVendorList_Gal.Selected

On the Save or Patch button:
OnSelect =
SubmitForm(VendorsList_Form);
Patch(
ColVendorList,
ColVendorList_Gal.Selected,
{
'Order Date': VendorsList_Form.LastSubmit.'Order Date',
Quantity: VendorsList_Form.LastSubmit.Quantity
}
);
What this does:
SubmitFormsaves changes to the SharePoint list.VendorsList_Form.LastSubmitgives you the record that was just saved.- Patch updates the matching record in
ColVendorList, so the gallery shows the new values immediately without needing to re‑collect the whole list.

That’s it! Let’s select the second item from the Power Apps gallery (i.e., Gilli). Modify the date to 12/25/2022 and the quantity to 210. When we click on the Patch button, the specified item will be modified only in the Power Apps collection.

5. Power Apps Patch a Collection dynamically From User Inputs
Another powerful use case is building collections dynamically from Power Apps controls like Text Input, Date Picker, and Dropdown.
Suppose you have a collection ColEmployee with columns: Name, JoinDate, Department.
On OnVisible of the screen, you might initialize it:
ClearCollect(
ColEmployee,
Table(
{ Name: "John", JoinDate: Date(2023,1,10), Department: "IT" }
)
);
On the screen, add:
- A Power Apps Text Input:
Name_Txt - A Power Apps Date Picker:
JoinDate_DatePicker - A Power Apps Dropdown:
Department_DD
Set dropdown Items:
Items = ["IT", "Finance", "Management"]
Now patch new records dynamically:
OnSelect =
Patch(
ColEmployee,
Defaults(ColEmployee),
{
Name: Name_Txt.Text,
JoinDate: JoinDate_DatePicker.SelectedDate,
Department: Department_DD.Selected.Value
}
)

This lets your users add new employees on the fly and see them instantly in a gallery bound to ColEmployee.
That’s all! Let’s preview the app and fill in the controls by inserting desired data. And click on the Patch button. We can see that the item was patched in the Power Apps collection and displayed in the above-mentioned gallery.

6. Patch a Power Apps Collection Back to Excel
You can also patch from a Power Apps collection into an Excel table that is connected as a data source.
Say you have an Excel table ProductsTable with columns Product, Availability, Quantity, and you loaded it into a collection ColProducts.


You want to modify the Excel row where Product = “Mobile” to set:
- Product = “Tablet”
- Quantity = 26
- Only if
Availability = "Yes"for that record.
You can do:
OnSelect =
ForAll(
Filter(ColProducts, Availablity = "Yes"),
Patch(
ProductsTable,
LookUp(ProductsTable, Product = "Mobile"),
{ Product: "Tablet", Quantity: 26 }
)
)

Once we click on the Power Apps button, the item will be modified in the Excel table as shown below:

This approach:
- Filters the collection in memory (fast) and then patches only those records that meet the condition.
- Keeps the logic in Power Apps while the final update happens in Excel.
7. How to Use Power Apps Patch to “Delete” or Hide Items From a Collection
Sometimes you don’t want to truly delete a record from the datasource, like a SharePoint list, Excel, etc. Instead, you set a flag and hide it in the UI.
Imagine a SharePoint list Product Model with a Yes/No column, Delivered.

You created a collection ColProductModel from this list and show it in a gallery with a checkbox bound to the Delivered column.

On the Power Apps Checkbox OnUncheck property:
Patch(
ColProductModel,
ThisItem,
{ Delivered: false }
);
Notify("Item deleted", NotificationType.Success);

Then, on the gallery Items property, you show only “active” items:
Filter(ColProductModel, Delivered = true)

That’s it! Let’s preview the app and uncheck an item within the gallery (for example, iPhone 12 Pro Max). Once we uncheck the item’s check box, it will remove that item from the gallery and notify the user as shown below:

8. Patch Yes/No columns From Power Apps Radio Control
For Yes/No columns coming from SharePoint, you might want to use a Power Apps Radio control (Yes / No) instead of a checkbox.
Assume:
- Collection:
collProduct - Boolean column:
Delivered - Gallery:
Gallery1 - Radio:
Radio2with Items =["Yes","No"]

On Radio OnChange:
Patch(
collProduct,
LookUp(collProduct, ID = Gallery1.Selected.ID),
{
Delivered:
If(
Radio2.Selected.Value = "No", false,
Radio2.Selected.Value = "Yes", true
)
}
)

This pattern:
- Uses the ID to find the correct record in the collection.
- Maps text values “Yes/No” to true/false.
- Keeps the collection and the gallery in sync with the user’s selection.
That’s all. Let’s change the options for a few items (Ex- 5 items from the first).

We can see those that will be changed in the Power Apps collection below:

9. Power Apps Patch Choice Columns From Dropdown
For SharePoint choice columns, you usually patch the whole choice record, not just the .Value.
Assume:
- Collection:
collProduct - Choice column:
Manufacturer(SharePoint choice) - Gallery:
Product Gallery - Dropdown:
Manufacturer_DDwith Items =Choices('Product Model'.Manufacturer)

Set the Default property of the dropdown:
'Product Gallery'.Selected.Manufacturer.Value

On dropdown OnChange patch back to the collection:
Patch(
collProduct,
LookUp(
collProduct,
Title = 'Product Gallery'.Selected.Title
),
{ Manufacturer: Manufacturer_DD.Selected }
)

Key point:
- For choice columns, you usually assign
Manufacturer_DD.Selected(the whole record) instead ofManufacturer_DD.Selected.Value.
10. Power Apps Patch One Collection Into Another Collection
Sometimes you need to keep two collections in sync or map values from one to another.
Say you have:
Collection1with columns: ProductNo, ProductGUIDCollection2with columns: ProductSeq, Vendor, ProductID
You want: if ProductNo = ProductSeq, then update ProductID in Collection2 with ProductGUID from Collection1.

You can do:
OnSelect =
ForAll(
Collection1,
UpdateIf(
Collection2,
ProductSeq = ProductNo,
{ ProductID: ProductGUID }
)
)

This is a neat pattern for:
- Joining data between collections.
- Performing mass updates where you match on a key field like ProductNo.
Once the patch button is clicked, we can see the ProductGUID will be updated in the ProdductID.

Best Practices When Patching Power Apps Collections
Here are some practical tips that will help you avoid common issues.
Use IDs or GUIDs for matching
When updating existing records with Patch, prefer using ID or GUID fields rather than text fields such as Name or Title.
Example:
Patch(
ColEmployees,
LookUp(ColEmployees, ID = varSelectedID),
{ Department: "Finance" }
)
This reduces the risk of updating the wrong record when names are duplicated.
Watch delegation and record limits
Collections themselves are not delegated, but functions you use to load data into them might be.
- SharePoint, SQL, Dataverse, etc., often have delegation limits (500–2000 records by default).
- When you use non‑delegable operations in your
ClearCollect, you might only get the first 500 (or 2000) records.
If you work with large data sets, try to:
- Use delegable filters where possible when building the collection.
- Use ID‑based paging or chunking patterns when importing big data into a collection.
Handle Patch errors
The Power Apps Patch command does not guarantee success every time.
There can be:
- Validation errors in SharePoint / Dataverse
- Permission issues
- Network problems
You can capture errors using the Errors function or IfError (with formula‑level error management turned on).
Example pattern:
UpdateContext(
{
varPatchedRecord: Patch(
'Vendors List',
Defaults('Vendors List'),
{ Title: "Test", Quantity: 10 }
)
}
);
If(
!IsEmpty(Errors('Vendors List')),
Notify(
Concat(
Errors('Vendors List'),
Message,
" "
),
NotificationType.Error
),
Notify("Saved successfully", NotificationType.Success)
);
This way, you don’t silently fail when a patch doesn’t go through.
If you build your apps with these patterns in mind, you will find it much easier to manage complex screens, multi‑step edits, and bulk updates in a clean and maintainable way.
Also, you may like some more Power Apps tutorials:
- Patch Dataverse Choice Column in Power Apps
- Auto Format Phone Number in Power Apps Form
- Patch Power Apps Combo Box
- Create Calculator in Power Apps
- Display “Time Ago” Labels in Power Apps

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.