cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigelP
Kudo Kingpin
Kudo Kingpin

Filtering Large SharePoint Lists using a person / group column

Hi

 

I have a large SharePoint List ( > 2000 items) that has a person / Group field in it.

 

This article suggests that I should be able to filter this list on the Person / Group field :- https://powerapps.microsoft.com/en-us/blog/powerapps-now-supports-working-with-more-than-256-items-i...

 

However I try, I still get the dreaded wavy blue line saying the filter will not work correctly with large datasets.

 

Surely there must be a number of HR SharePoint lists with > 2000 items which have got around this problem ?

 

Any help, greatly received.

 

Regards

 

Nigel

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @NigelP,

 

This warning indicates that a function can't be delegated, PowerApps might not be able to retrieve all of the data, and your app may have wrong results. About delegation, please refer to below documentation:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

The non-delegatable part seems to focus on the .Email part. 

Capture.JPG

 

To workaround this issue, you can first save your SharePoint list into a collection by setting below formula in the OnStart property of the first screen:

ClearCollect(Collection1,ListName)

 

Then use Collection1 as the data source in Filter function. 

Filter(Collection1, Person.Email=User().Email)

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.

View solution in original post

5 REPLIES 5
Drrickryp
Super User
Super User

Person is an embedded table and will always show a delegation error in sharepoint lists when used in powerapps. Unless there are more than 2000 names in the person field, I think it can be ignored. I think Kris @v-xida-msft may know how to unpack it as a collection so that it doesn't show the error. You may want to check @CarlosFigueira ,

’s blog post  Defining default values for complex SharePoint types in forms

v-monli-msft
Community Support
Community Support

Hi @NigelP,

 

This warning indicates that a function can't be delegated, PowerApps might not be able to retrieve all of the data, and your app may have wrong results. About delegation, please refer to below documentation:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

 

The non-delegatable part seems to focus on the .Email part. 

Capture.JPG

 

To workaround this issue, you can first save your SharePoint list into a collection by setting below formula in the OnStart property of the first screen:

ClearCollect(Collection1,ListName)

 

Then use Collection1 as the data source in Filter function. 

Filter(Collection1, Person.Email=User().Email)

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.

View solution in original post

Thanks @v-monli-msft

 

So does this mean that the article :-  https://powerapps.microsoft.com/en-us/blog/powerapps-now-supports-working-with-more-than-256-items-i... is incorrect then ?

 

One thing work pointing out is that  Person.Email=User().Email) is SLOW.

 

A better way would be set a global variable Set(useremail, User().Email) and then the filter comes :-

 

Filter(Collection1, Person.Email=useremail)

 

which is much quicker.

 

Regards

 

Nigel

 

I found this could solve my problem of delegation, too. But in this case, does Person still subject to the limit of 2000 items?

 

Martin

I believe that Collect is also not delegable (although doesn't show a warning sign) so if you do go over the 2000 limit the collection will only retain the first 2000 items and not give you the full list to be filtered by useremail - see Shanes comments on the below link:

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Delegation-Collection-vs-Collect-amp-ClearCo...

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,261)