cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

 

 

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

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,326)