How to PATCH a SharePoint Single Line Text Column using Power Apps
When working with Power Apps, often the need arises to modify data in a SharePoint list. This guide will walk you through the simple process of updating a SharePoint Single Line Text column using the “123 patch” in Power Apps. Whether you’re a novice or an expert, this comprehensive guide will ensure smooth sailing.
Objective
Our main goal is to modify the Address column, which is of the type Single Line Text, from “123 Fake Street” to “456 Ocean Avenue”.
Initial Data
Let’s consider our starting point as a SharePoint List titled ‘Client Locations’ with the following records:
ID | Client Name | Location |
---|---|---|
1 | XYZ Widgets Firm | 123 Fake Street |
123 Patch Code
Use the patch function below to accomplish our objective:
Patch(
'Client Locations',
LookUp('Client Locations', ID=1),
{
Location: "456 Ocean Avenue"
}
)
Result
After running the patch function, our SharePoint List ‘Client Locations’ should reflect the following update:
ID | Client Name | Location |
---|---|---|
1 | XYZ Widgets Firm | 456 Ocean Avenue |
Additional Scenarios
Scenario #1: Text Input
What if we want to patch a value found in a text input to our Single Line Text field? Use the following:
Patch(
'Client Locations',
LookUp('Client Locations', ID=1),
{
Location: TextInput_Loc.Text
}
)
Scenario #2: Dropdown
If you’re looking to patch a value derived from a dropdown to our Single Line Text field, this is your solution:
Patch(
'Client Locations',
LookUp('Client Locations', ID=1),
{
Location: Dropdown_Loc.Selected.Value
}
)
If you find any step confusing or need further assistance with Power Apps, SharePoint, or any other technical query, please don’t hesitate to contact us. We are always here to help, and yes, we do offer premium services for those seeking expert solutions.
Conclusion
Modifying SharePoint columns via Power Apps, especially using the “123 patch”, is a seamless process. This guide should equip you with the confidence to make necessary changes to your SharePoint Lists with ease. Remember, for any technical challenges, we’re just a click away.