Here is a slightly different solution, reading the reference table directly
Names Default To Here( 1 );
Clear Globals();
//dt = Open( "Data table.jmp" ); // Open data table
dt = Data Table( "data table" );
// Loop to get column name Currents and Voltages
colist = {};
Col_List = dt << Get Column Names( "String" );
For( q = 1, q <= N Items( Col_List ), q++,
If( Contains( Col_List[q], "Current" ) | Contains( Col_List[q], "Voltage" ),
Column( Col_List[q] ) << Set Selected( 1 );
Insert Into( colist, Col_List[q] );
)
);
// Var Chart
vc = dt << Variability Chart(
Y( (Eval( colist )) ),
X( :Wafer ID ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Show Range Bars( 0 ),
Std Dev Chart( 0 ),
Points Jittered( 1 )
);// Reference data table
//dt1 = Open( "Reference table.jmp" );
dt1 = Data Table( "reference table" );
xb = Column( dt1, "Reference" ) << getValues;
// Loop to add reference line to the variability chart
For( i = 1, i <= N Items( vc ), i++,
//Report( vc[i] )[Framebox( 1 )] << DispatchSeg( CustomStreamSeg( 3 ), {Line Width( 2 )} );
testVal = Word( -2, Report( vc[i] )[Outline Box( 2 )] << get title, " " ) || " " || Word(
-1,
Report( vc[i] )[Outline Box( 2 )] << get title,
" "
);
testRow = dt1 << get rows where( :tests == testVal );
If( N Rows( testRow ) > 0,
Report( vc[i] )[AxisBox( 1 )] << Add Ref Line( dt1:Reference[testRow[1]], "Solid", "Green", "RTS", 2 )
);
);
Jim