cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ramirezp
Level: Powered On

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
ramirezp
Level: Powered On

Re: filter created by

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
Community Support Team
Community Support Team

Re: filter created by

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.
ramirezp
Level: Powered On

Re: filter created by

Hi V-Monli,

 

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

hpkeong
Level 10

Re: filter created by

Hi @ramirezp

 

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

- Author.Email=txtMyEmail.Text

 

May you try?

 

TQ

hpkeong
ramirezp
Level: Powered On

Re: filter created by

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!!!

hpkeong
Level 10

Re: filter created by

Hi

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

Thanks.
hpkeong
roknron
Level: Powered On

Re: filter created by

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

ramirezp
Level: Powered On

Re: filter created by

Hi @hpkeong,

 

Please find a screenshot attached.

 

ramirezp
Level: Powered On

Re: filter created by

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

 

 

ramirezp
Level: Powered On

Re: filter created by

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,813)