I try to do the for loop ..
dt is my raw data.dt_spec is the spec file.
things seem to work except on the line below
limrow = Try( (dt_spec << get rows where( dt_spec:Label == ColList[i]))[1], . );
it doesn't return the number of rows. However, when I replace ColList[i] with the name, it works fine.
Any idea why ?
ColList = dt<< get column names (numeric);
for(i=1, i<= n items(ColList),i++,
limrow = Try( (dt_spec << get rows where( dt_spec:Label == ColList[i]))[1], . );
controllimits = {Levey Jennings(LCL( b ), UCL( c ) )};
Substitute Into( controllimits, Expr( b ), dt_spec:_LCL[limrow] );
Substitute Into( controllimits, Expr( c ), dt_spec:_UCL[limrow] );
Column( dt, Char( ColList[i] ) ) << set property( "control limits", Eval( controllimits ) );
);