How To Patch A SharePoint Lookup Column In Power Apps

In this blog, we are going to see how to use a Patch function to update a SharePoint lookup column in Power Apps.

In a SharePoint list we have a column EquipmentNeededLookUp, our goal is to update EquipmentNeededLookUp (Lookup type) from Flip Charts to Laser Pointer.

Input

Meeting Request (SharePoint List).

ID MeetingTitle EquipmentNeededLookUp
1 Appraisal Meeting Flip Charts

Equipment Master (SharePoint List).

ID Equipment
1 Flip Charts
2 Laser Pointer
3 Microphones

Patch Function Code

Patch('Meeting Request', LookUp('Meeting Request', ID = 1), {
    EquipmentNeededLookUp: {
        Id: 2,
        Value: LookUp('Equipment Master', ID = 2, Equipment)
    }
})

Output

Meeting Request (SharePoint List).

ID MeetingTitle EquipmentNeededLookUp
1 Appraisal Meeting Laser Pointer

There is another way to Patch a value found in a combo box to a Lookup field.

How To Patch A SharePoint Lookup Column In Power Apps

Patch Function Code

Patch('Meeting Request', LookUp('Meeting Request', ID = 1), {
    EquipmentNeededLookUp: ComboBox_EquipmentNeeded.Selected
})

That’s it, you have seen how to use a Patch function to update a SharePoint lookup column in Power Apps. Feel free to fill up the comment box below if you need any further assistance.