I am back with another blog on Power Apps and this one I am quite sure you would find interesting.
People picker controls are great as they allow you to select the users from Office 365. If you are working with SharePoint data source, you will find People picker controls. Precisely this is how they look like.
Unfortunately there is no People picker control from the controls gallery in Canvas apps. But not to lose heart. We can easily create a people picker control from a combo box in few simple steps. So let’s get started.
Below is an assignee field where users can search and look for users from Office 365.
Office365Users.SearchUser({searchTerm: ComboBox1.SearchText, top:10})
I set the Items property to the users returned by the search text entered by the user in the combo box control itself.
The next step is to make sure that end users are able to type in Search text. For that I set the IsSearchable property of the Combobox to true.
Now comes the most important part. The ability to show the control as people picker. Pretty unknown to even experienced Power Apps developers, there is indeed a way to display a combox box in various layouts.
For that, you need to click on “Edit” fields and change the layout to Person
Once selected you can set the field values accordingly. The Primary text and Secondary Text are display options and SearchField denotes the field based on which search will happen in the combo box.
Well that’s it. And below is picker in action.
Hope this helped!
You will like the below posts.
Debajit Dutta
Business Solutions MVP
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.