Recently, I was working on creating login forms using Power Apps, and I encountered a requirement for users to update their passwords if they forget them.
During this process, the passwords stored in the SharePoint list must be updated accordingly.
In this article, I will explain how to update SharePoint list items using Power Apps Patch function.
Update SharePoint List Using Power Apps Patch Function
Power Apps Patch() function helps to create a new record or modify existing records in any data sources like SharePoint list, Excel, Sql, etc.
Syntax: Patch(Datasource, BaseRecord, ChangeRecord)I have a SharePoint list called Event Registration Form, which stores the details of registered users.

Refer to the table below, which contains the above SharePoint list column names and their data types.
| Column Name | Type |
|---|---|
| UserID | Single line of Text |
| Password | Single line of Text |
| First Name | Single line of Text |
| Last Name | Single line of Text |
| Email Address | Single line of Text |
| Phone Number | Single line of Text |
| Department | Choice |

To achieve this, follow the below steps.
1. Create one blank canvas application in Power Apps; on the new screen, add the following controls.
- Three Text Input controls -For, Email, NewPassword, and Confirm Password.
- Three Text label controls -For, Email, NewPassword, and Confirm Password.
- Button Control -To update the password.
- Icons, if you require them.
Design the screen with the above controls as shown below.

2. Now, connect with the SharePoint list from the Data in Power Apps navigation.

3. Provide the formula below in the OnSelect property of the button control.
If(
txt_NewPassword.Text = txt_ConfirmPassword.Text,
Patch(
'Event Registration Form',
LookUp(
'Event Registration Form','Email Address'=txt_Email.Text
),
{Password: txt_ConfirmPassword.Text}
);
UpdateContext({errorVisible: false}),
UpdateContext({errorVisible: true})
);
Notify("Password updated successfully", NotificationType.Success);
Reset(txt_ConfirmPassword);
Reset(txt_Email);
Reset(txt_NewPassword);Here,
- txt_NewPassword and txt_ConfirmPassword = New and confirmed password text input control names.
- ‘Event Registration Form‘ = SharePoint list name. And ‘Email Address’ is the column name in that SharePoint list.
- txt_Email = Text input control name of the email.
- Password = SharePoint list column name
- errorVisible = Variable name that can be used only within the screen.
- Notify() = Displays the message if the condition is satisfied.
- Reset() = Helps reset the controls after all the conditions.
In the above formula, the If condition first checks whether the new and confirmed passwords are identical.
If yes, the Patch() updates the password based on our entered email. Later, it sends one success notification, resets the email, and confirms password controls. If not, it sets one variable to display the error message.

4. Add one Text label to display an error message. Then, provide the below variable name in the Visible property of the text label.
Visible: errorVisibleThen, provide the message in the Text property of the text label.
Text: "Passwords do not match. Please try again."5. To convert the text entered in the password field into dots, provide the formula below in the screen’s Onvisible property.
Set(Password_View,TextMode.Password);
Then, use this Password_View variable in the Mode property of both new and confirmed password text input controls.
Mode: Password_View6. Save the app and reload it once. Then, it will work properly; see the example below; the text entered into the password fields is converted to dots.

7. If you want to see the provided password, put the below formula in the View icon’s OnSelect property.
Set(Password_View,TextMode.SingleLine);This will convert the dotted password into text.

8. Now, save and publish the app. While previewing, If I enter different passwords on the new, confirm password text input controls, it displays an error message.

This way, we can update the SharePoint list items from Power Apps using the patch function.
Additionally, you may like some articles below:
- Link to a Specific Screen in Power Apps
- Get Current User Information in Power Apps
- Get Selected User Manager Name By Default in Power Apps
- How to Create Cascading Dropdown in Power Apps
- Power Apps Barcode Reader Control
- Power Apps Form field validation on submit
- Power Apps Print Function
I hope you found this article informative. In it, I explain how to update SharePoint list items from Power Apps.
You can use it as a guide whenever you’re trying to update the datasource records from Power Apps.

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.