You can’t add detail records from inside a script.
You can, however, store all the values in an array and then you can use that array inside a loop to extract the values to detail records. The following code does something like that (using your sample data)
var line = data.extract(1,1000,0,1,"");'';
var allFields = line.split(/,/);
var detailTable = ;
After that Action step, the
Note: since your loop won’t actually be reading lines in the data, you will have to set its Goto step to jump to a known location (for instance, back to line 1) and you will also have to specify in the Loop properties that the maximum iterations on each line is set to
detailTable.length, otherwise you’ll receive an infinite loop warning.
As for the condition driving the loop, you can do something like the following: