Skip to main content

How to Add a People Picker in Power Apps

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

A people picker is a combo box that finds people as you type. In Power Apps, point the combo box at a SharePoint Person column with Choices, and pass it what has been typed: the people come back as records the column can save.

The example below is the Approvers box on a form that adds and edits departments: each department has approvers, the people who approve its staff's overtime.

Prerequisites​

Step 1: Set Items​

Select the combo box and set its Items:

cmbApproversED → Items
Choices(Departments.Approvers, Self.SearchText)
  • Departments.Approvers is the list's Person column, written directly on the list. Microsoft's Choices function reference says the column reference can't go through a function, a variable or a control (How to Get the Options of a SharePoint Choice Column in Power Apps with Choices).
  • Self.SearchText is what has been typed in this combo box. Choices uses it as a text filter: the reference says it returns only the choices that start with that text, and all of them for an empty text.
  • Each choice is a person, as a record with DisplayName, Email, Claims, Department, JobTitle and Picture.

The formula bar with the Items property of cmbApproversED set to Choices(Departments.Approvers, Self.SearchText), the preview strip showing Data type Table, and the Edit department screen on the canvas with Day Surgery and Olivia Bennett in Approvers

In Studio nothing is typed, so the strip under the formula bar shows the result for an empty search (How to See What a Formula Returns in Power Apps Studio). Selecting the arrow on the strip opened the table: one person, Aisha Khan, with the six fields of a person record:

The formula bar with Choices(Departments.Approvers, Self.SearchText) and the result opened below it: a table with the columns Claims, Department, DisplayName, Email, JobTitle and Picture, and one row for Aisha Khan, Emergency Department, Staff Nurse

Microsoft's reference says an empty filter returns all the choices, and its pages don't explain why only one person came back. Typed searches found the people asked for (Step 4).

Step 2: Show the Names​

Set ItemDisplayText to the person's name:

cmbApproversED → ItemDisplayText
ThisItem.DisplayName

The formula bar with the ItemDisplayText property of cmbApproversED set to ThisItem.DisplayName, the preview strip saying This formula uses scope, which is not presently supported for evaluation, and the Edit department screen on the canvas

ThisItem is each person in the list, so the strip can't show one value and says so. The list and the box show the names.

Step 3: Set How It Searches​

PropertyValueWhy
SelectMultipletrueChoose several people. Microsoft's combo box page gives true as the default.
DelayOutputtrueSearchText updates when the typing pauses, not on every keystroke, so each search waits for more of the name. The default is false.
InputTextPlaceholder"Search for people"Says what to type.
AccessibleLabel"Approvers: the people who approve overtime in this department"What screen readers announce.

Step 4: Try It​

In Preview, with nothing typed, the list showed the same single person as the strip:

The Add department screen in Preview with the Approvers list open and nothing typed, showing one person, Aisha Khan

Typing Oli listed Olivia Bennett:

The Add department screen in Preview with Oli typed in the Approvers box and the list showing Olivia Bennett

The search matches the start of a first name or a surname, and ignores case:

TypedFound
Oli, oliviaOlivia Bennett
BenOlivia Bennett
Dan, BroDaniel Brooks
liv, ennettNobody

Choosing a person ticks them and keeps the list open, with the typed text still in the box, so several people can be chosen in a row. Microsoft's combo box page says the search text clears on selection; here it stayed until the list closed. Selecting anywhere outside the box closes the list, and the box shows everyone chosen, separated by a comma and a space:

The Edit department screen in Preview with Name Day Surgery, Approvers Olivia Bennett, Daniel Brooks, the Active toggle on and a green Save button

To take a person off, open the list and select them again: the combo box page says selecting a selected item deselects it.

Common Mistakes​

MistakeWhat happensDo this instead
Choices(locDepartment.Approvers, ...)Microsoft's reference doesn't allow it: the column reference must be directChoices(Departments.Approvers, ...)
Typing the middle of a nameNobody is found: liv finds nobodyType the start of a first name or surname

Troubleshooting​

SymptomLikely causeFix
One person shows before anything is typedWhat Choices returned for an empty searchType the start of a name
The search finds nobodyThe text isn't the start of a first name or surnameType Oli, not liv
The typed text stays after choosing someoneThe list is still openSelect outside the box to close it

FAQ​

Can it pick only one person?​

Set SelectMultiple to false. Microsoft's combo box page says only one item can be selected then, and Selected returns it.

Do I need the Office 365 Users connector?​

Not for this picker: its formula uses only the SharePoint list.

Where do the chosen people go?​

SelectedItems is a table of the chosen people. Save it to the column with Patch (How to Save People to a SharePoint Person Column with Patch in Power Apps), and show the saved ones when an item is opened again (How to Show Saved People in a Combo Box in Power Apps).

Conclusion​

Choices(List.PersonColumn, Self.SearchText) in a combo box's Items, with ItemDisplayText ThisItem.DisplayName, makes a people picker: the start of a first name or surname finds people, as records the column can save.

Additional Resources​