cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
D1nos
Regular Visitor

SharePoint - Improve a query on a Lookup field

I have a "Request" form ("Requests" list), which is meant to list all (child) 'Request Profile' records.

The 'Request Profiles' list has a lookup field ('Request').

 

I am trying to filter on the lookup field (the filter below works), but it displays a delegation warning at the ".Id =" part.

I thought that the Filter() is delegated in SharePoint.

According to this: SharePoint - Connectors | Microsoft Docs  and this: Understand delegation in a canvas app - Power Apps | Microsoft Docs

 

Filter('Request Profiles',Request.Id = ThisItem.ID)

 

How can I re-write the above to avoid problems in the future?
(I am expecting much more than 500 records 😞 )

 

Thanks!

 

 

D1nos_0-1623083217258.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @D1nos ,

 

The lookup column isn't delegable.

If you have less than 2000 records and more than 500 records, I suggest you modify the delegation setting.

v-xiaochen-msft_0-1623116311163.png

 

If you have more than 2000 records, I suggest you use the Number column instead of the lookup column.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @D1nos ,

 

The lookup column isn't delegable.

If you have less than 2000 records and more than 500 records, I suggest you modify the delegation setting.

v-xiaochen-msft_0-1623116311163.png

 

If you have more than 2000 records, I suggest you use the Number column instead of the lookup column.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

D1nos
Regular Visitor

@v-xiaochen-msft  Thank you for answer. I cannot predict the number of items that will be stored and I cannot risk blocking the application because of this.

 

When switching from .Id to .Value I do not receive the warning. Is the .Value is delegatable?
It feels strange for me as number comparisons are "lighter and faster".

 

I also discovered there is a user voice request to make the .Id delegatable too.
Enable delegation on lookup 'Id' column - Power Platform Community (microsoft.com)

 

Thanks!

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,704)