Is there a way to have the row that is selected in the Process screener be selected in the data table through JSL?
For example, what script could be used to select this highlighted row item in the datatable?
Thanks for any suggestions!
Steve
And building on the example from @txnelson, you could do something like this:
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" ); ps = dt << Process Screening( Process Variables( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1, :PNP4 ), Grouping( :SITE ), Control Chart Type( "Indiv and MR" ) ); psr = Report( ps ); tb = psr[Table Box( 1 )]; tb << setRowChangeFunction( Function( {this}, // Remove any existing column selection dt << selectColumns([]); // Use the current row selection to select table columns sr = this << getSelectedRows; cols = {}; for(c=1, c<=NRow(sr), c++, InsertInto(cols, (tb[StringColBox(1)] << get)[sr[c]])); dt << selectColumns(cols); ); );
Below is a script that prints to the log the value of the first row and first column to the log. It accesses the value through the Display Tree access capability in JMP. See Display Trees in the Scripting Guide
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" ); ps = dt << Process Screening( Process Variables( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1, :PNP4 ), Grouping( :SITE ), Control Chart Type( "Indiv and MR" ) ); psr = Report( ps ); Show( (psr[String Col Box( 1 )] << get)[1] );
The log output is
(psr[String Col Box(1)] << get)[1] = "NPN2";