hello all,
i have a dialog box with a combo box " two, lower and upper", and each of them is passed to the distrubtion plaform for predition interval. however, I can pass my variable collected using the dialog box. if i manule added the "two", or "lower" or "upper" to the script, the script works, please help.
Names Default To Here( 1 );
dt= current data table();
//dialog box for analysis selection
dlg=New Window( "Begin Analysis", << Modal,
H List Box(
Panel Box( "Analysis",
//Column role selection
V List Box(
pb1#=H List Box(
cols = Col List Box( All ),
Line Up Box( N Col( 2 ),
Button Box( "QC, Column for Trending",
a col << Append( cols << Get Selected ),
<< Set Tip( "Pick a column for the trending chart " )
),
a col = Col List Box( N Lines( 1 ) ),
Button Box( "Trending Variables, assay date",
b col << Append( cols << Get Selected )
),
b col = Col List Box( N Lines( 1 ) ),
Button Box( "Trending Variables, run number",
c col << Append( cols << Get Selected )
),
c col = Col List Box( N Lines( 1 ) ),
Button Box( "Remove",
{ a col, b col, c col } << Remove Selected
)),
v list Box( e col=number edit box(0.997),
Text box("enter control range t-stat interval"),
v list Box ( intervals= Combo Box({"Two", "Lower","Upper"},
selection = intervals << GetSelected();),
Text box("Select two-sided, Lower one-sided, or Upper one-sided")
),
),
),
H List Box(
ok# = Button Box( "OK",
a col = column((a col << get items)[1]); //"QC, Column for Trending"
b col = Column( (b col << Get Items)[1] ); //"Trending Variables, assay date"
c col = Column( (c col << Get Items)[1] ); //"Trending Variables, run number"
e col =e col <<get;//t-stat interval
Selection = Selection<<Get;//select two sided or one sided
),
Button Box( "Cancel", << Set Tip( "Abort analysis now" ) ),
)
))));
if(Selection ==1, int = as name("two"));
if(Selection ==2, int = as name("lower"));
if(Selection ==3, int = as name("upper"));
nw= New Window("QC Trending Analysis",
ob = outlinebox("QC Trending" ,
utline box("Distribution",
Distribution(
Stack( 1 ),
Continuous Distribution(
Column( a col ),
Horizontal Layout( 1 ),
Vertical( 0 ),
Fit Distribution( Normal( Goodness of Fit( 1 ) ) ),
Prediction Interval( e col, 1, int),
)
)
)
)
);
no, it dosn't solve the issue. I just make an expression to handle each case, rather than passing the character variable.
but, thanks for the suggestion.
Here is a modification of your script with changes that I believe correct the issue you are concerned with
Names Default To Here( 1 );
dt = Current Data Table();
// Default if the selection button is not ever touched
Selection = 1;
//dialog box for analysis selection
dlg = New Window( "Begin Analysis",
<<MODAL></MODAL>