@txnelson
Hey Jim,
I'm trying to modify the script you provided here.
I'm failing...
I'd like to have one single additional column which collects the fail categories. The fail category should show the first failing column. Therefore, I loop reverse with the intention to overwrite all the subsequent fail categories.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
dt << New Column( "First_Failed_Test", character, set each value( "Pass" ) );
colNames = dt << get column names( continuous, string );
For( i = N Items( colNames ), i >= 1, i--,
Clear Symbols( specs );
specs = Column( dt, colNames[i] ) << get property( "Spec Limits" );
If( Is Empty( specs ) == 0 | Eval( specs["LSL"] ) != Eval( specs["USL"]) ,
theRows = dt << get rows where( Eval( specs["LSL"] ) >= As Column( dt, colNames[i] ) >= Eval( specs["USL"] ) );
If( N Rows( theRows ),
Column( dt, "First_Failed_Test" )[theRows] = colNames[i]
);
);
);
Do you see what is wrong with the script?