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"
}
}
)
Alternate Code
Patch(
'Site Inspections',
LookUp('Site Inspections', ID=1),
{
BranchLocationLookUp: {
Id: 2,
Value: LookUp('Branch Locations', ID=2, Title)
}
}
)
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
}
)
Did You Enjoy This Article? 😺
Subscribe to get new Power Apps articles sent to your inbox each week for FREE