PATCH A SharePoint LookUp Column In Power Apps
PATCH A SharePoint LookUp Column In Power Apps Goal Change the BranchLocationLookUp column (Lookup Type) from “Fargo, ND” to “Minneapolis, MN” in a SharePoin...
- Published
- Reading time
- 1 min read
Before you start
Is this guide for you?
- Best entry point
- SharePoint
- Time investment
- 1 min read
Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/power-apps-patch-function-examples-for-every-sharepoint-column-type/patch-a-sharepoint-lookup-column-in-power-apps/. Author: Matthew Devaney.
PATCH A SharePoint LookUp Column In Power Apps Goal
Change the BranchLocationLookUp column (Lookup Type) from “Fargo, ND” to “Minneapolis, MN” in a SharePoint List Input Site Inspections (SharePoint List) ID InspectionName Date BranchLocationLookUp 1 Quality Audit 11/7/2020 Fargo, ND Branch Locations (SharePoint List) ID Branch Location 1 Fargo, ND 2 Minneapolis, MN Patch Function Code Patch(
'Site Inspections' , LookUp( 'Site Inspections' , ID= 1 ), { BranchLocationLookUp : { Id : 2 , Value : "Minneapolis, MN" } } ) Code language: JavaScript ( javascript ) Alternate Code Patch(
'Site Inspections' , LookUp( 'Site Inspections' , ID= 1 ), { BranchLocationLookUp : { Id : 2 ,
Value : LookUp( 'Branch Locations' , ID= 2 , Title) } } ) Code language: JavaScript ( javascript ) Output Site Inspections (SharePoint List) ID InspectionName Date BranchLocationLookUp 1 Quality Audit 11/7/2020 Minneapolis, MN Scenario #1: Combo Box
Patch a value found in a combo box to a Lookup field. Patch Function Code Patch(
'Site Inspections' , LookUp( 'Site Inspections' , ID= 1 ), {
BranchLocationLookUp : ComboBox_BranchLocation.Selected } ) Code language: JavaScript ( javascript ) Did You Enjoy This Article? 😺
Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up
Tagged
Patch · SharePoint
Have a Microsoft 365 topic idea?
Share article suggestions, community session ideas, corrections, or real-world scenarios for future nxtM365 learning notes.
Keep learning Microsoft 365
Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.
Continue learning
Related tutorials
Related questions
Related comparisons
Next action