cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

Re: Filter SharePoint list on Current User

Hi @Grahambo05

Can you please clarify what value you have for Screen.OnVisible?

The limitations are not on the || operator, but on the functions that may or may not be delegable.

Details here:

https://powerapps.microsoft.com/en-us/tutorials/delegation-overview/

Highlighted
Advocate IV
Advocate IV

Re: Filter SharePoint list on Current User

OnVisible = UpdateContext({UserEmail:User().Email})

 

Gallery.Items = SortByColumns(Filter('Event Opportunity',StartsWith(Title,SearchBox1.Text),(Employee_x0020_Requsted.Email = UserEmail || Author.Email = UserEmail || Event_x0020_Leader.Email = UserEmail )) ,"Created",Descending)

 

I am needing to filter the gallery if an end user is Employee_x0020_Requsted, Author, or Event_x0020_Leader.

Highlighted
Community Champion
Community Champion

Re: Filter SharePoint list on Current User

Hi @Grahambo05

You cannot delegate a filtering by Column.Email (Author, Event leader etc.) so you should only see results from the first 500 records of your list.

Also, I would place the UpdateContext({UserEmail:User().Email}) in the OnStart property of the home screen, since the user cannot be different, and this will be more efficient.  This will of course not be context, but this:

Set(UserEmail, User().Email)

So that this is a global variable that you can use everywhere.

Reference here

Highlighted
Advocate IV
Advocate IV

Re: Filter SharePoint list on Current User

@Meneghino

 

Thank you for clearing this up for me. Will I need to create a column that will only hold email values so I can delegate filter?

Highlighted
Community Champion
Community Champion

Re: Filter SharePoint list on Current User

Yes, correct, as text.

Also, please remember that text comparisons in PowerApps are case sensitive.

Highlighted
New Member

Re: Filter SharePoint list on Current User

Hi did you get any solution for this, as I am also got stuck on the same problem

SortByColumns(Filter(Target, StartsWith(Event, TextSearchBox1.Text)), "Event", If(SortDescending1, Descending, Ascending))

I want to apply Approver = User().Email as well but it is showing some error for limitation near .Email

Highlighted
Advocate IV
Advocate IV

Re: Filter SharePoint list on Current User

@rohitkpatra

 

I created a solution combined with flow. I first created columns to the sharepoint list called (example: ApproverEmail), column type as single line of text instead of people picker. 

I used flow to update my previous Sharepoint list items to add the Approver people picker value to the new single line of text column.

 

Instead of referencing Approver.Email = User().Email , it will be (*New String Column*) ApproverEmail = User().Email

 

For the workflow I added a step to update this information after the trigger "When a new sharepoint list item is created"

Highlighted
Helper V
Helper V

Re: Filter SharePoint list on Current User

Hello Friend!

I'm really new at PowerApps.

Where I have to put thi?

1. Screen.OnVisible = UpdateContext({UserEmail: User().Email}) 

 you could also do Screen.OnVisible = UpdateContext({UserName: User().FullName}) though i recommend Email as that is guaranteed to be unique.

Highlighted
Community Champion
Community Champion

Re: Filter SharePoint list on Current User

Highlighted
Helper V
Helper V

Re: Filter SharePoint list on Current User

Thank you Meneghino!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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