I am trying to read Goal and Importance from one jmp table and set them into columns in a different table. I am not able to understand how I can loop around the column names to read data from the other limits table. Here is my script:
Names Default To Here( 1 );
// Select the data table and open it
path = Pick File( "Select Data Table" );
dt = Open( path );
// Select the limits table and open it
path = Pick File( "Select Limits Table" );
dt2 = Open( path );
Current Data Table( dt );
x = dt << Get Column Names(string,numeric);
y = dt2:ColumnName << Get Column Names();
show(x);
show(y);
ncols = N Items(x);
for (i=1, i<=ncols, i++,
a = Column(i) << Get Name;
show(a);
dt << current data table ();
Eval(
Eval Expr(
Column(dt,Expr(x)) << Set Property(
"Response Limits",
{Goal(Expr(Goal)), Lower(a,b), Middle(c,d), Upper(e,f)});
)
)
);
I would appreciate if anyone could explain to me the looping and matching part. Thanks