cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Meneghino
Level 10

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/

Grahambo05
Level 8

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.

Meneghino
Level 10

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

Grahambo05
Level 8

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?

Meneghino
Level 10

Re: Filter SharePoint list on Current User

Yes, correct, as text.

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

rohitkpatra
Level: Powered On

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

Grahambo05
Level 8

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"

rgparisoto
Level: Powered On

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.

Meneghino
Level 10

Re: Filter SharePoint list on Current User

rgparisoto
Level: Powered On

Re: Filter SharePoint list on Current User

Thank you Meneghino!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 192 members 5,642 guests
Please welcome our newest community members: