Not sure I understand. Are you trying to create a detail table of Colors per record? Meaning you need to iterate on the same line? Ok Proceed as follow:
Add an Action step to extract the array of colors with the expression
var arrColors = data.extract(10,65,0,1,"<br />").trim().split(" ");
Add a Repeat step:
- set repeat type to “Until statement is true”
- Maximum iterations on each line to : parseInt(arrColors.length);
- Condision based on JavaScript with expression: parseInt(steps.currentLoopCounter);
- Operator: is equal to
- Right hand operator based on JavaScript with expression: parseInt(arrColors.length);
Inside the Repeat Step, insert a Condition step
- Based on JavaScript with the expression: parseInt(steps.currentLoopCounter);
- Operator: is equal to
- Based on Value
- Value: 0
In the True branch of the above condition, Add an Extract step:
- set the Mode to JavaScript with the expression: arrColors[parseInt(steps.currentLoopCounter)-1];
In the False branch of the condition:
- Add a GoTo step with Target type: Line; from Current position and Move by -1
- Add an Extract step and set the Mode to JavaScript with the expression: arrColors[parseInt(steps.currentLoopCounter)-1];
After the Condition but still within the Reapeat loop, make sure your Go to step Moves by 1 (line)
