cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ramirezp
Kudo Collector
Kudo Collector

filter created by

I am trying to filter the app's gallery by the current user.  I created a text box that holds the user's email address (txtMyEmail.Text).  Then I am placing the code below in the 'Items' section of the Gallery.  However, it is not working.  Would some please point me in the right direction.  Thanks!!!

 

If(IsBlank(TextSearchBox1.Text),Sort(Filter('Gift Compliance',Author.Email=txtMyEmail.Text,Created By,CustomerName),Filter('Gift Compliance',TextSearchBox1.Text in 'CustomerName'))

16 REPLIES 16

Sorry for the duplicate post above.  But here is the

 

 

Sorry for the duplicate post above.  Below is the Created By column that I see when I view the details of my Sharepoint item list in the app.Capture1.PNG

 

 

Sorry for the duplicate post above.  But here is the

 

 

hpkeong
Community Champion
Community Champion

Hi

 

I can see that:

- Author.DisplayName in 'Created By' & the last filter

showed ! in blue. That means nothing wrong with Formula but with Delegation Limitation.

 

When you filter with Created By, I wish to know where is Author.DisplayName comes from?

Just guessing the comparision may not be from compatible source.

May you confirm.

Anyway just my wild guess.

hpkeong

Hi @hpkeong,

 

You are right!  I was using Author as a function when in reality I should have been using the User() function.  Author is actually the column name in my Sharepoint list.  Then I justed used the ".Email" property to get them into comparable formats.  Therefore, I was able to filter by the current user by fixing the syntax in bold below.  Thanks again for your help!  I wouldn't have been able to solve that one on my own 🙂

 

If(IsBlank(TextSearchBox1.Text),Sort(Filter('Gift Compliance',User().Email in Author.Email),CustomerName),Filter('Gift Compliance',TextSearchBox1.Text in 'CustomerName'))

View solution in original post

hpkeong
Community Champion
Community Champion

Hi @ramirezp

 

Glad that you have found by yourself the very tiny mistake.

I am just sharing my experience.

 

Have a nice day and Happy CNY.

hpkeong

Thanks @hpkeong! Happy CNY to you too!

for my case it worked, so

 

Filter(Vendor, StartsWith(Title, TextSearchBox1.Text ) || StartsWith(Author.Email, TextSearchBox1.Text ) || StartsWith(Identification, TextSearchBox1.Text ) )

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (5,392)