cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FlyGuy
Regular Visitor

Auto-Populate employee details

Hello Power App Community!

 

I'm brand spanking new to Power Apps and trying to learn as I go. One of the things that I'm trying to do is create a form that would search our O365 database and auto-populate the following fields:

 

Search Box to enter name/number/email 

 

Name: 

(Uses DisplayName from O365)

Location

(Uses City from O365)

Employee Number

(Uses MailNickname from O365)

 

This would then be submitted and shared to a SharePoint list. 

 

Any help is super appreciated!

2 REPLIES 2
mdevaney
Super User
Super User

@FlyGuy 
You will want to the Office365Users connector.  Add it to your app.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-users

 

Create a SharePoint list with a Person field called 'Employee'.  Then add a form to your app based on that SP List.  The user search box will appear without you having to create it.


Then you could find each piece of data by making a reference to the Employee ComboBox.  Data will only appear once you have selected a person.

 

ComboBox_Employee.Selected.displayName
ComboBox_Employee.Selected.Email
ComboBox_Employee.Selected.mailNickname

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

rubin_boer
Super User
Super User

Hi there add a TextBox for search and three labels

 

label1 text = First(Office365Users.SearchUserV2({searchTerm:TextBox.Text}).value).DisplayName

 

label3 text = First(Office365Users.SearchUserV2({searchTerm:TextBox.Text}).value).OfficeLocation

 

label3 text = First(Office365Users.SearchUserV2({searchTerm:TextBox.Text}).value).MailNickname

 

there you go

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,568)