Hello all,
Setup:
I have a set of 5 local variables say v1,v2,...,v5
I have another global variable varNum that can take value from 1 to 5.
What I want to do:
If varNum is 3, I want to set first 3 local variables v1,v2,v3 to true.
If varNum is 1, set v1 to true and so on.
Algorithm:
array = [v1,v2,v3,v4,v5]
For v in (1 to varNum):
UpdateContext({array[v]:true})
I tried:
ForAll(
FirstN([v1,v2,v3,v4,v5],varNum),
UpdateContext({ThisRecord:true})
);
of course, Lord Microsoft does not allow to use UpdateContext under ForAll. Nor there is any loop function. If you can suggest something similar, that would be great.