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
- Set the Collection for the drop-down field with ID and Value as a key pair.
- Connect to the SharePoint list as a data source to this app.
- Add Forms (Edit) type control and create custom fields for each list column and map it correctly.
- Connect the lookup list as a data source and bind the correct column to a lookup field in the form.
- Set the collection variable created on App Start () to the drop-down field.
- For People Picker or person field, use 'Office365Users.SearchUser()' as a source to Items property.
- Add a button for patching the form values to the SharePoint list and OnSelect property use the Patch() to patch data to SharePoint.
- After clicking on the Patch button, data will be saved to Sharepoint.
- 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.