cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

Auto populate per user information from a SharePoint List

Is it possible to auto populate per user information from a SharePoint List?

 

I have a form with the following text input

 

Payroll Name
Job Title Description
Home Department Description
Location Description
Reports To Name
Work Contact: Work Email

 

Also have a SharePoint list with all the users information data with the column above.

 

Wanted to see if there is way to auto populate that user information once they open up the form.

 

Hope you understand

Thank you in advance! 🙂

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Auto populate per user information from a SharePoint List

Hi @oappdev 

 

In PowerApps you can get the current logged in users email using User().Email

Set this in a variable on AppStart function

Set(varUserEmail,User().Email)

 

To fetch data from the SP list

Use

Set(payrollData,Lookup(DataSource, Column = varUserEmail))

where payrollData - will contain the data for the logged in user

DataSource - name of your SP list

Column - column in the list where the email is mapped

 

Then to get the values for the user,

just use 

payrollData.ColumnName 

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

 

 

 

 

 

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User
Dual Super User

Re: Auto populate per user information from a SharePoint List

Hi @oappdev 

 

In PowerApps you can get the current logged in users email using User().Email

Set this in a variable on AppStart function

Set(varUserEmail,User().Email)

 

To fetch data from the SP list

Use

Set(payrollData,Lookup(DataSource, Column = varUserEmail))

where payrollData - will contain the data for the logged in user

DataSource - name of your SP list

Column - column in the list where the email is mapped

 

Then to get the values for the user,

just use 

payrollData.ColumnName 

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

 

 

 

 

 

View solution in original post

Highlighted
Post Patron
Post Patron

Re: Auto populate per user information from a SharePoint List

@RezaDorrani Thank you! I will give it a try and let you know

Highlighted
Post Patron
Post Patron

Re: Auto populate per user information from a SharePoint List

@RezaDorrani 

So i  Set(varUserEmail,User().Email) on AppStart function

Capture.JPG

 

Where will i add

Set(payrollData,Lookup(DataSource, Column = varUserEmail))

 

PowerApps.JPG

 

Having one of those day

Highlighted
Dual Super User
Dual Super User

Re: Auto populate per user information from a SharePoint List

Hi @oappdev 

 

OnVisible of screen where form is there

Set(payrollData,Lookup(DataSource, Column = varUserEmail))

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,870)