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

Delegation problem: Filter(..., some_field in listOfIntegers)

Dear community,

 

I have a SharePoint list Bestellungen, whose entries contain a lookup column "KlasseLehrerID".

Now I have a table/collection with a handful of integers and want to filter all items from Bestellungen that have a KlasseLehrerID which appears in this table of integers. The result of the Filter serves as data for a gallery.

 

I can't get to run this without delegation problems (the Bestellungen list could be more than 2000 rows big). Do you have any clue how to get this delegated?

 

This is what I tried:

 

The collection is called "KLids" (it's not static. It gets created in OnVisible of the screen)

Screenshot 2022-05-20 at 15.52.46.png

 

I tried this directly in the table:

Filter(Bestellungen, KlasseLehrerID.Value in KLids)   // --> works, but delegation warning

 

Then I tried to use a For-loop, outsourced into a hidden button which is selected whenever something could change in the list:

Clear(BesList);

ForAll(KLids As kid,
Collect(BesList, Filter(Bestellungen, KlasseLehrerID.Value = Text(kid.Result)))
)

 

This collection BesList is then used as source for the gallery.

But it still gives me the delegation warning. 

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

HI @kgrjnn ,

 

What happens if you remove the Text() function? If you are using it because the Result column is of type Number, you can also try changing it to a Text type when pulling together the collection.

View solution in original post

2 REPLIES 2
BCBuizer
Super User
Super User

HI @kgrjnn ,

 

What happens if you remove the Text() function? If you are using it because the Result column is of type Number, you can also try changing it to a Text type when pulling together the collection.

Thanks, that did the trick!

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 (3,289)