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)

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.