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

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

4 REPLIES 4
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()

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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