cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DAllen
Frequent Visitor

Fill fields from list on previous page

Is there a way to have a user select their name from a list and then have their email address appear in the email field on the next page to be validated?

 

For example, if I choose Scott from the first image, I would like for his email (which would be his company email) to appear in the email field in the second image and then require Scott to use his system O365 password to be authenticated. The goal here is to allow users to only see their data.

 

Capture.JPGCapture1.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
BitLord69
Power Participant
Power Participant

Good morning!

 

There's no need to do the authorization again, since to use PowreApps and your app the user has already logged on. Thanks to this you can via the User() function get the full name of email-address: User().FullName etc.

 

You can then use this in a gallery's Items-property via a call to Filter or perhaps Search, given that the table you want the data from contains that information, i.e. Filter(Table1; User = User().FullName) where Table1 is the table you want to get data from and User is a field in said table. That way the gallery will show only data for the current user of the app.

 

EDIT - I put the parentheses wrong, they of course belong after User()... and not after FullName

View solution in original post

3 REPLIES 3
BitLord69
Power Participant
Power Participant

Good morning!

 

There's no need to do the authorization again, since to use PowreApps and your app the user has already logged on. Thanks to this you can via the User() function get the full name of email-address: User().FullName etc.

 

You can then use this in a gallery's Items-property via a call to Filter or perhaps Search, given that the table you want the data from contains that information, i.e. Filter(Table1; User = User().FullName) where Table1 is the table you want to get data from and User is a field in said table. That way the gallery will show only data for the current user of the app.

 

EDIT - I put the parentheses wrong, they of course belong after User()... and not after FullName

View solution in original post

DAllen
Frequent Visitor

BitLord69, 

 

This is exactly what I was looking for! Thank you so much for this information! I may have more questions moving forward, so don't go too far!

BitLord69
Power Participant
Power Participant

You're welcome, I'm glad I could help!

 

I just noticed one thing in one of my apps - when I used this together with SortByColumns I got the blue warning icon that it wasn't an optimized query (meaning you will get a maximum of 500 records even if there are more). I solved this by setting a variable in the screen's OnVisible:

 

UpdateContext({sUser:User().FullName})

and then I used that variable to do the filtering, and no more blue bubble!

 

I'm looking into the forum quite often while at work, so fire away! 🙂

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (30,844)