Hi,
I am working on creating an event handler function that will switch to the histogram tab and scroll to the process distribution when a row in the process table within the summary tab is selected.
For example, if I click on “PNP4” in the table, the function should automatically switch to the histogram tab and scroll to the specific location displaying that process distribution. Any suggestions?
![Jackie__1-1731594438015.png Jackie__1-1731594438015.png](/t5/image/serverpage/image-id/70156i8FF3E34A5E096A24/image-size/medium?v=v2&px=400)
![Jackie__2-1731594645758.png Jackie__2-1731594645758.png](/t5/image/serverpage/image-id/70157i140E3159624F4B6A/image-size/medium?v=v2&px=400)
Here is the jsl code:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
col_names = dt << get column group( "Processes" );
tab = dt << Tabulate( Add Table( Column Table( Statistics( Mean, Std Dev ) ), Row Table( Analysis Columns( Eval( col_names ) ) ) ) );
dt2 = tab << Make Into Data Table;
tab << close window;
nw = New Window( "",
<<Type( "Dialog" ),
<<onclose(
rs = 0;
1;
),
Panel Box( ,
tabbb= Tab Box(
"Summary",
V Scroll Box(
tbbox = Table Box(
String Col Box( "Tests", (dt2:Analysis Columns << get values) ),
Number Col Box( "Mean", (dt2:Mean << get values) ),
Number Col Box( "Std Dev", (dt2:Std Dev << get values) ),
)
),
"Histogram",
vsb = V Scroll Box(
V List Box(
For Each( {col, idx}, col_names,
dt << distribution(
Stack( 1 ),
Continuous Distribution(
Column( col_names[idx] ),
Horizontal Layout( 1 ),
Normal Quantile Plot( 1 ),
Customize Summary Statistics(
Std Err Mean( 0 ),
Upper Mean Confidence Interval( 0 ),
Lower Mean Confidence Interval( 0 )
),
Vertical( 1 ),
Process Capability( 0 )
)
)
)
)
)
)
)
);
Close( dt2, nosave );
tabboxxpath = nw << XPath("//TabPageBox[text()='Summary']//TableBox");
tabboxxpath << Set Selectable Rows( 1 );
fun = Function( {a},
tabbb << set selected ( 2 );
vsb << Set Scroll Position( 0, 200 );
);
rs = tbbox << make row state handler( fun );