cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
landonjochim
Resolver II
Resolver II

Filter Person Field that is Blank while avoiding Delegation

I have a Gallery in my PowerApp that is pulling back a filtered SharePoint List. Currently I am getting a delegation warning when I use a IsBlank(PersonField). So I am trying to work through this and the warning goes away if I do PersonField.DisplayName="", however this does not filter the list and remove the items that the PersonField is Blank/Empty.

 

SharePoint List name: PurchaseRequest_PurchaseRequestList

Results needed: 

'Submitted by' = Me

And either 

Status = "Pending"

or

'Assigned to' = [empty] AND Status = "Approved"

 

The 'Submitted by' field and 'Assigned to' fields are both Person/Group fields within the SharePoint List. 'Status' is a choice field.

 

Here is my formula that is returning the filtered data correctly, but is giving me delegation warnings:

Sort(Filter(PurchaseRequest_PurchaseRequestList, 'Submitted By'.Email=currentUserProfile.mail && (Status.Value="Pending" || ((IsBlank('Assigned To') && Status.Value="Approved")))), Submitted, Descending)

 

Here is my formula that is returning items that are 'Submitted by' = Me and 'Status' = Pending. However, it is not returning the ones where 'Assigned to' = [empty] && 'Status' = Approved. But I am not getting any delegation warnings with this formula.
Sort(Filter(PurchaseRequest_PurchaseRequestList, 'Submitted By'.Email=currentUserProfile.mail && (Status.Value="Pending" || (('Assigned To'.DisplayName="" && Status.Value="Approved")))), Submitted, Descending)

I am ultimately looking for a way to check if the 'Assigned to' field is empty/blank without causing delegation issues. and yes, my list is > 2000 and I need to be able to return those items so increasing the data row value is not an option.

Thanks!

landonjochim_1-1620254464468.png

 

 

landonjochim_0-1620254387952.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

@WarrenBelz - Thanks for the response. I ended up opting for using a collection on load of the screen. I performed all my delegable filtering in the clearcollect and then only did my non-delegable filtering on the collection. Works great. 

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @landonjochim ,

Complex field types such as Person Fields are not Delegable - there is a way of getting rid of the warning, but this will simply work only on list sizes up to your Delegation limit.

I have a blog on Delegation that may assist with some workarounds.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

@WarrenBelz - Thanks for the response. I ended up opting for using a collection on load of the screen. I performed all my delegable filtering in the clearcollect and then only did my non-delegable filtering on the collection. Works great. 

Thanks @landonjochim ,

That is the way I was referring to . . .

I know this is a bit old but for anyone else who finds this thread another option would be:

PersonField.DisplayName = Blank()

Works like butter! Thanks a ton. 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,393)