So, there's quite a few moving parts here.
I have a model which sets label. For instance,
I have a label called PartName which has PartName saved in it.
I then created tracked variable with exact same name as the label PartName.
I want to then increment the Tracked Variable by PartWeight label
All these labels are pulled from a list
Now I am trying to do this in FlexScript to increment my tracked variable for all label names using just one code block.
double initial = TrackedVariable(token.pulled[token.loopcount].PartName).value; double val = token.pulled[token.loopcount].PartWeight.value; TrackedVariable(token.pulled[token.loopcount].PartName).value = initial + val;
This isn't currently not incrementing the value of tracked variable. What am I doing wrong? Is there a better way to do it?