Before reading this article, please go through the article links, mentioned below.
The User() function can show the full name, Email address and picture associated with the current signed-in user. It automatically fills in a form.
Benefits of User()
- Create a sign-up "sheet" for the users to attend training, volunteer for the events and more.
- Display the full name on a Human Resources app.
- Automatically, you can enter an Email address when contacting your Helpdesk.
- Basically, you can use this anywhere, where the users would benefit from an automatically-populated form or automatically-populated labels.
Developer Requirements
- Download PowerApps from Windows store.
Follow the steps, mentioned below in getting the user details in the PowerApps.
Step 1
Log into the PowerApps After downloading PowerApps from Windows store, we need Microsoft related organization’s Office 365 ID or (MSDN, Microsoft, Skype, Office 365 etc.) to log in with it.
Step 2 Create a New App in PowerApp After login, we can see the dashboard. Subsequently, we click New button.
Step 3 Choose the Blank App Now, we choose the Blank app.
Step 4 Designing the App Now, let's start designing the app. In the left side, we can see the individual screens for changing our data in the templates. In the right side, we will see the list of layouts.
In the top, we see the formula bar. Subsequently, you will see the Properties of the screen, which you have selected.
Step 5 Choose the Layout Choose the Blank layout from the right side layout panel.
Step 6
Drag & Drop the Image Control
- Drag the Image Control from Insert -> Media.
- Drop the Image control in the screen
- Add the coding to the image control.
- Coding : User().Image.
Step 7
Drag & Drop the Text Box Control
- Drag the text box control from Insert -> Text.
- Drop the text box control in the Screen to display the the User FullName.
- Add the coding to the text box control.
- Coding : User().FullName.
Step 8
Drag & Drop the Text Box Control
- Drag the another text box control from Insert -> Text.
- Add the coding to the text box control for displaying user Email.
- Coding : User().Email.
Step 9
Run the app.
Output
Conclusion
I hope, you understood how to get the user details in Microsoft PowerApps and how to run it.