cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
shampton82
Level VII

Process screener column selection in data table

Is there a way to have the row that is selected in the Process screener be selected in the data table through JSL?

shampton82_0-1613963244207.png

For example, what script could be used to select this highlighted row item in the datatable?

 

Thanks for any suggestions!

Steve

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: Process screener column selection in data table

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);
							);
						);

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Process screener column selection in data table

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

tablebox.PNG

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";
Jim
ian_jmp
Level X

Re: Process screener column selection in data table

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);
							);
						);

Recommended Articles