open=("C:\source\new.jmp);
For (
i=1,
i<= nitems(files),
i++,
data table("new")<<NEW column=""></NEW>I know that the above script is wrong, and I wrote it as a rough example.
There are 3 JMP files of the same type in the source folder.
After creating a new column using the For SCRIPT
I want to put Jan, Feb, Mar sequentially.
I need help figuring out what to do.
Dear @CramerRaoMink21 , welcome to the community.
You can do it like below, tested for JMP16, earlier versions should use old loop syntax, BR
edit: sorry, misunderstood first, maybe now it's what you need.
Names Default To Here( 1 );
dt1 = new table("Table 1", add rows(10), new column ("Column A", formula(row())));
dt2 = new table("Table 2", add rows(10), new column ("Column B", formula(row())));
dt3 = new table("Table 3", add rows(10), new column ("Column C", formula(row())));
dt_lst = List( dt1, dt2, dt3 );
month_lst = List( "Jan", "Feb", "Mar" );
For Each( {value, index}, dt_lst, value << New Column( "Month", "Character", set each value( (month_lst[index]) ) ) );