I am trying to create a new column formula that changes variable names every time a for loop is iterated. See below for the JSL code:
For(i = 1, i <= 5, i++,
dtMachineStartandStopTimes << New Column(:Machine||char(i)||RunDuration, Formula(:Machine||char(i)||StopTime-:Machine||char(i)||StartTime));
);
Each row in dtMachineStartandStopTimeshas columns labeled "Machine1StartTime" thru "Machine5StartTime" as well as "Machine1EndTime" through "Machine5EndTime". The code above does not work, but I feel like there should be a simple way to make it work.
FYI, I have already viewed the post at https://community.jmp.com/t5/Discussions/How-to-create-variable-names-depending-on-loop-number/td-p/7422, but I cannot figure out what the poster is doing.