Stack takes a list as argument so it's can be done in much simpler way here.
collist = dt1_L5 << get column names;
dt1_L0 << stack(
columns( (collist) ),
Source Label Column( "Label" ),
Stacked Data Column( "Data" ),
Output Table( "L5" )
);
Avoid for-loops inside platform commands. Btw, I tried to submit a reply to your previous question, but it had been deleted before I hit "Add Reply". Probably you found a solution already, but here's my take on that. Again, for-loops inside platforms may not always work as some commands may not evaluate the argument (e.g a quoted string is required).
monthlist = {4, 5, 7, 9, 11, 12};
wind = New Window( "Bivariate",
dt1_L0 << Bivariate( Y( :Data ), X( :Price ), By( :MONTH ) )
);
For( i = 1, i <= N Items( monthlist ), i++,
wind[1, i, Framebox( 1 )] << {Frame Size( 633, 249 ),
Row Legend(:FLOORS,
Color Theme( "JMP Default" ),
Marker Theme( "Standard" ),
)}
);