
This code (excusez the european)
;;ForAll(
Sequence(4;NumberOfPasses-3;1)
;Collect
(
CachedLastDierExtra;
Filter(
DierExtra
;DocaNummer >= (Value * 2000) And DocaNummer < (Value+1) * 2000
)
)
)
yields a delegation error if table dierextra is a dataverse table but not if it is a sql table.
If I replace (value*2000) and (value+1)*2000 with hard numbers the delegation troubles disappear.
Putting these values into new variables outside the forall loop does make the delagation go away, but inside, alas, UpdateContext is not allowed by Lord Powerapps 😉
Try:
;;ForAll(
Sequence(4;NumberOfPasses-3;1)
;With({minValue:Value * 2000; maxValue:(Value+1) * 2000}
;Collect
(
CachedLastDierExtra;
Filter(
DierExtra
;DocaNummer >= minValue And DocaNummer < maxValue
)
)
)
)
to see if the problem persists.
Hope it helps !