Posts

Showing posts from November, 2025

Mastering CRUD Operations in PowerApps Using Patch, LookUp, and Remove

Image
In this post, let's learn all the CRUD operations using Patch in PowerApps.  Before we start, let's understand the Patch function. The Patch function has 3 inputs as given below: 1 - This is the data source. It could be a table from Dataverse or SharePoint or a collection. 2 - By using Defaults with the data source, it notified to create a new record. 3 - You specify the name of the column and its value. Use Patch to create a record: There are 3 ways to create a record: 1 - Using hardcoded values. As seen in above example, Patch(MyDataSource, Defaults(MyDataSource), {Col1: "Some value", Col2: "Some more value", Col3: "Alot of values"}); 2- Using variables UpdateContext({TextVariable: "Monday"}); Patch(MyDataSource, Defaults(MyDataSource), {Col1: TextVariable}); 3 - Reference value of a control Patch(MyDataSource, Defaults(MyDataSource), {Col1: TextInput.Text}); Use Remove and RemoveIf to remove one or all records: Remove() function is us...