People Picker in Canvas Apps

Insert a People Picker in Canvas Power App using Combo Box. Below are the steps:

  • Add Office 365 Users Data Source.
  • Add a Combo Box. Click on Edit Fields on Properties Bar.
  • Select Person as the Layout.
  • To pre-populate the Combo Box with the existing value, write below code in DefaultSelectedItems property. RequestSubmittedByEmail and RequestSubmittedByName are the names of columns in Table
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
DisplayName:ThisItem.RequestSubmittedByName,
Claims:"i:0#.f|membership|" & Lower(ThisItem.RequestSubmittedByEmail),
Department:"",
Email:ThisItem.RequestSubmittedByEmail,
JobTitle:"",
Picture:""
}
  • Set Items property as
Office365Users.SearchUser({searchTerm:cmbRequestSubmittedBy.SearchText, top:10})

cmbRequestSubmittedBy is the name of the Combo Box

  • Set IsSearchable as true
  • Set SearchFields is [“Mail”] as we will be searching using Mail ID.
  • Set InputTextPlaceholder as “Enter Email ID”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s