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 currently 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 the 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 the Windows store, we need a Microsoft-related organization’s Office 365 ID (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 the 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. On the left side, we can see the individual screens for changing our data in the templates. On the right side, we will see the list of layouts.
At 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 on 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 on the Screen to display the User FullName.
- Add the coding to the text box control.
- Coding, User().FullName.
Step 8. Drag & Drop the Text Box Control.
- Drag the other 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.