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

Filter Gallery by current user

Hi expert,

I've read the post with the same keywords but still can't figure it out by myself.

Please help.

I have an excel file like this:

drinkdatealiasemail
Coca-Cola2019.5.22Juju@microsoft.com
red tea2019.5.21peppypeppy@microsoft.com
black tea2019.5.20lucylucy@microsoft.com
tea2019.6.28qqqqqq@microsoft.com

 

I want to demonstrate the Gallery based on the current user.

For example, when lucy using this PowerApp, she can only see her drink.

 

I don't know how to configure the filter, attach the app screenshot for your reference.

Please help!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Filter Gallery by current user

Hi @wanwan 

 

You need to place the formula in "Items" property of the text control. Please remove it from visible and set the "visible" property as true.
 
Also, to overcome this delegation warning, please follow below steps:
 
1) On the "OnStart" property of you app, place this expression:
Set(UserEmail, User().Email)
 
2) Now Items need to be modified as:
Filter(DataSourceName,email = UserEmail)
 
If you have more than 500 records in your datasource, please make sure you update the below setting:
Navigate File -> App Settings -> Advanced Settings -> Data Row Limit for Non-Delegable queries -> Set this to 2000.
 
Hope this helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User
Dual Super User

Re: Filter Gallery by current user

Hi @chungchung 

 

Can you try the expression:
 
Filter(DataSourceName,email = User().Email)
 
Here, please replace DataSourceName with the actual name of your data source. User().Email return the email address of current logged-in user.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
New Member

Re: Filter Gallery by current user

Hi @yashag2255 ,

Thanks for your help.

I've used the formula as you mentioned in the Visible for the Gallery.

However, that didnt work with the following message Delegation Warning as shown in the screenshot below.

Please advise.

Highlighted
Dual Super User
Dual Super User

Re: Filter Gallery by current user

Hi @wanwan 

 

You need to place the formula in "Items" property of the text control. Please remove it from visible and set the "visible" property as true.
 
Also, to overcome this delegation warning, please follow below steps:
 
1) On the "OnStart" property of you app, place this expression:
Set(UserEmail, User().Email)
 
2) Now Items need to be modified as:
Filter(DataSourceName,email = UserEmail)
 
If you have more than 500 records in your datasource, please make sure you update the below setting:
Navigate File -> App Settings -> Advanced Settings -> Data Row Limit for Non-Delegable queries -> Set this to 2000.
 
Hope this helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Regular Visitor

Re: Filter Gallery by current user

Hi @yashag2255 

I have tried this in my gallery, it becomes blank without any warning or error. 

Before I editing my Sharepoint List filter view permission, this work, after editing, it becomes blank. 

 

Can you please help on it?

 

Thank you

Filter(DataSourceName,email = User().Emails

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 (8,341)