cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
oappdev
Super User
Super User

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
RezaDorrani
Dual Super User
Dual Super User

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
RezaDorrani
Dual Super User
Dual Super User

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.

 

 

 

 

 

 

 

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

@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

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,249)