Hello JMP community,
I have a question regarding objects reference in jmp scripts. The below code runs (JMP pro 17.2), but the process screening pops out in a different window, not in the Make_Win function, where the button is also placed. I know that if I would copy paste the
PS = dt << Process Screening(...); part inside the V List Box then the behavior becomes as expected, but then the code becomes less readable and more cluttered.
Is there a way to define PS somewhere else and only include its reference inside the function (as shown in the example below), or how else would you make the code below work as intended.
Cols = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1", "PNP4", "NPN3", "IVP2", "NPN4", "SIT1", "INM1", "INM2",
"VPM1", "VPM2"};
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
PS = dt << Process Screening(
Y( Eval(Cols)),
Control Chart Type( "Indiv and MR" ),
Minimum Process Length( 1 ),
Use Medians instead of Means( 1 ),
Show tests( 0 ),
Test 1( 0 ),
Cp( 1 ),
Spec Limits( 1 ),
);
Make_Win = Expr(
New Window( "ProcessScreening",
Vlist_box = V List Box(
PS,
MyButton = Button Box( "SelectedRows", SendRows ),
),
),
);
SendRows = Expr(
print_cols = Report( PS )[Table Box( 1 )][String Col Box( 1 )] << getselectedrows();
Print( Report( PS )[Table Box( 1 )][String Col Box( 1 )][print_cols] );
);
Make_Win();
Thanks,
JNS.