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

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
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
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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (80,110)