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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

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

16 REPLIES 16
Highlighted
Community Support
Community Support

Hi ramirezp,

 

It seems that the created by column is not shown in my app when I'm trying to reproduce your issue. Did you have the same issue?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Hi V-Monli,

 

Yes, same issue.  I am trying to find the best way to filter by the current user.  Thanks!

Highlighted
Community Champion
Community Champion

Hi @ramirezp

 

I try to understand your code and maybe something missing here:

- Author.Email=txtMyEmail.Text

 

May you try?

 

TQ

hpkeong
Highlighted

Hi @hpkeong,

 

I tried that but still no luck.   I tried this new code (placed in the Items field of BrowseGallery1) to see if I can filter the gallery by the current user but it did not work.  For some reason, I cannot fetch the Created By column. Is there another way to achieve this?

 

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

 

Thanks in advance!!!

Highlighted
Community Champion
Community Champion

Hi

Maybe a screenshot, with your codes next to them may help is better understanding.

Thanks.
hpkeong
Highlighted
Helper I
Helper I

It appears that you are missing a closing parentheses ")"  The example of the the if has 5 "(" and only 4 ")"

Highlighted
Kudo Collector
Kudo Collector

Hi @hpkeong,

 

Please find a screenshot attached.

 

Highlighted
Kudo Collector
Kudo Collector

Hi @hpkeong, @roknron,

 

Please find a screenshot below.  It appears that I can't fetch the 'Created By' column from my Sharepoint list.  I also checked the parenthesis and they are fine (5 of each now).  Let me know if you need anything else.  I really appreciate your help!

Capture.PNG

 

 

Highlighted
Kudo Collector
Kudo Collector

Hi @hpkeong, @roknron,

 

Please find a screenshot below.  It appears that I can't fetch the 'Created By' column from my Sharepoint list.  I also checked the parenthesis and they are fine (5 of each now).  Let me know if you need anything else.  I really appreciate your help!

Capture.PNG

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,225)