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'))
Solved! Go to Solution.
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.
Sorry for the duplicate post above. But here is the
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.
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'))
Glad that you have found by yourself the very tiny mistake.
I am just sharing my experience.
Have a nice day and Happy CNY.
for my case it worked, so
Filter(Vendor, StartsWith(Title, TextSearchBox1.Text ) || StartsWith(Author.Email, TextSearchBox1.Text ) || StartsWith(Identification, TextSearchBox1.Text ) )
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!