What I need is a call to a variable, by using a string name in a loop. See for example the (simplified) attached model.
I tried it with: ValueToString, ExecString, ParString, etc. But I cannot find a way to do it.
The main target is to do some calculations with the variable: "tussenstap"
Code: Select all
Do(
Var([SommatieProduct1] ,vbValue,0 ),
Var([SommatieProduct2] ,vbValue,0 ),
Var([SommatieProduct3] ,vbValue,0 ),
Var([SommatieProduct4] ,vbValue,0 ),
Var([SommatieProduct5] ,vbValue,0 ),
Var([Runner] ,vbValue,1 ),
Var([Samensteller] ,vbString ),
Var([Tussenstap] ,vbValue ),
SommatieProduct1:= 0,
SommatieProduct2:= 4,
SommatieProduct3:= 8,
SommatieProduct4:= 12,
SommatieProduct5:= 16,
For(Runner:=1, Runner < 6, Inc(Runner),
Do(
Samensteller:= Concat([SommatieProduct],String(Runner)),
{And this stept is not working....}
Tussenstap := ExecString(Samensteller)
)
)
)