Display Office365 users in PowerApps Combobox and Default value.
- First,create a Office365Users data connection in PowerApps application.
- Add a datacard in powerapps and then add a combobox to the card.
- Select combobox and then go to Items property and then add below function to see the users email accounts(If you want to see the users’ names, then you need to select “DisplayName”) Sort(Upper(Office365Users.SearchUser({searchTerm:UserComboBox.SearchText}).Mail),Mail)
- To make the combobox searchable, go to combobox properties and then enable “Allow Searching” as shown in picture.
- To show the blank values when a new form loads or when you select the record from the gallery, and if there is no value in the datable, use the following code. If(IsBlank(ThisItem.UserEmail),Sort(Upper(Office365Users.SearchUser({searchTerm:Blank()}).Mail),Mail),Upper(Office365Users.SearchUser({searchTerm: Parent.Default}).Mail))
- To save the selected value to database when you submit the form, add below code to Datacard Update property. UserComboBox.Selected.Mail
- Default value on details page: add value in below format in DefaultSelectedItems property. Table({Value: HydroBrowseGallery.Selected.userName})

Leave a Comment