cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdhamFH
Helper V
Helper V

Custom BrowseGallery

Hello, 

im trying to build app using excel in onedrive as data and then i have 3 screen, editscreen, browsescreen and detailscreen. and then i want to separate my browsescreen based on user office365, so every user have their own preview data but still on the same excel. is it possible to that ?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@AdhamFH

There's a pretty cool function called USER that will help here. User will show information about the current user logged into the app.  To get familiar with USER I suggest you temporarily put each one of these in a separate label and view the result.

 

User().DisplayName  //shows the first and last name
User().Email  //shows the email address

 

Now that we can tell who the current user is which should we use: DisplayName or Email?  I prefer Email because it will always be unique for each User.  DisplayName is not recommend because there could be a case where two users have the same name (e.g. John Smith and John Smith) 

 

Next open your spreadsheet on Office365 and add a new column to your table called Email.  Put your email beside any items belonging to you.  You will need at least one record belonging to you for my mini-tutorial to work.  Then add the email address for any remaining users.

 

Go to back into PowerApps and refresh the datasource.  Do this by going to the left-side menu, clicking the datasource name and selecting Refresh.  Now open your app's BrowseScreen and click on the Gallery.  Change the Items property of the Gallery to this code.

 

Filter(your_datasource_name,Email=User().Email)

 

Your app will now only show records belonging to you (the current user)

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
mdevaney
Super User III
Super User III

@AdhamFH

There's a pretty cool function called USER that will help here. User will show information about the current user logged into the app.  To get familiar with USER I suggest you temporarily put each one of these in a separate label and view the result.

 

User().DisplayName  //shows the first and last name
User().Email  //shows the email address

 

Now that we can tell who the current user is which should we use: DisplayName or Email?  I prefer Email because it will always be unique for each User.  DisplayName is not recommend because there could be a case where two users have the same name (e.g. John Smith and John Smith) 

 

Next open your spreadsheet on Office365 and add a new column to your table called Email.  Put your email beside any items belonging to you.  You will need at least one record belonging to you for my mini-tutorial to work.  Then add the email address for any remaining users.

 

Go to back into PowerApps and refresh the datasource.  Do this by going to the left-side menu, clicking the datasource name and selecting Refresh.  Now open your app's BrowseScreen and click on the Gallery.  Change the Items property of the Gallery to this code.

 

Filter(your_datasource_name,Email=User().Email)

 

Your app will now only show records belonging to you (the current user)

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

@mdevaney  Thank you for your response. it helps me 

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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (52,201)