Power Apps Patch - Dropdown, People Picker And Lookup Field In SharePoint

Introduction

 
This blog describes how to patch Sharepoint people picker, drop down, and Lookup field from Power Apps.
 

SharePoint List Setup

 
First, create a list in SharePoint Online/Office 365 with lookup, people picker, and dropdown filled. I have considered these filed types because these fields are a bit tricky to patch/update it in SharePoint via PowerApps.
 
Once the SharePoint list is ready, create a new app (Canvas- Tablet view) in PowerApps.
 

Steps

  1. Set the Collection for the drop-down field with ID and Value as a key pair.

    Power Apps Patch - Dropdown, People Picker And Lookup Field In SharePoint

  2. Connect to the SharePoint list as a data source to this app.
  3. Add Forms (Edit) type control and create custom fields for each list column and map it correctly.
  4. Connect the lookup list as a data source and bind the correct column to a lookup field in the form.
  5. Set the collection variable created on App Start () to the drop-down field.
  6. For People Picker or person field, use 'Office365Users.SearchUser()' as a source to Items property.

    Power Apps Patch - Dropdown, People Picker And Lookup Field In SharePoint

  7. Add a button for patching the form values to the SharePoint list and OnSelect property use the Patch() to patch data to SharePoint.

    Power Apps Patch - Dropdown, People Picker And Lookup Field In SharePoint

  8. After clicking on the Patch button, data will be saved to Sharepoint.
  9. If you have added gallery control and used the current list as a data source then, you need to use Refresh() to refresh to data into the gallery as shown below. You can format gallery control as per your needs.
Power Apps Patch - Dropdown, People Picker And Lookup Field In SharePoint