Display a text box asking for input from the userHi,
I want to add Text edit box asking user to enter values for Q and Tail quantile to explore outliers. Here is what I tried but seems like I'm missing something. Can you advise that might help with this?
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Water Treatment.jmp");
check_list = {"SS", "SE", "PH"};
todo_list = {};
nw = new window("Checkboxes", << modal(),
"Input",
V List Box( Text Box( "Enter Tail Quantile " ), tail = Text Edit Box() ,
Text Box( "Enter Q Value " ), quan = Text Edit Box() ),
my_cb = checkbox(check_list),
panelbox("Actions",
hlistbox(
button box("OK",
ta = tail << get text();
qu = quan << get text();
keep_going = 1;
todo_list = my_cb << get selected;
),
button box("Cancel", keep_going = 0)
),
),
);
For(i = 1, i <= N Items(colList), i++,
If(Contains(colList[i], "SS"), Insert Into(filteredCols, colList[i]))
);
obj = dt <<
Explore Outliers(
Y((Eval(filteredCols) )));
obj << Quantile Range Outliers;
obj << Tail Quantile (ta);
obj << Q(qu);
obj << Select Rows(All);
ScriptingRe: Display a text box asking for input from the userBoth the Tail Quantile and Q entries need to be numeric, not string/text. Use the Num() function to convert.
Re: Display a text box asking for input from the userA few modifications - your original code didn't initialize a few things. I used number edit box() and lineup box() for a nicer look. Number edit box only allows entry of numbers.

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Water Treatment.jmp");
check_list = {"SS", "SE", "PH"};
todo_list = {};
nw = new window("Checkboxes", << modal(),
text box("Input"),
Lineup Box( N Col( 2 ),
Text Box( "Enter Tail Quantile: " ), tail = number Edit Box() ,
Text Box( "Enter Q Value: " ), quan = number Edit Box()
),
my_cb = checkbox(check_list),
panelbox("Actions",
hlistbox(
button box("OK",
ta = tail << get();
qu = quan << get();
keep_going = 1;
todo_list = my_cb << get selected;
),
button box("Cancel", keep_going = 0)
),
),
);
collist = dt << get column names(string);
filteredcols = {};
For(i = 1, i <= N Items(colList), i++,
If(Contains(colList[i], "SS"), Insert Into(filteredCols, colList[i]))
);
obj = dt << Explore Outliers( Y((Eval(filteredCols) )));
obj << Quantile Range Outliers;
obj << Tail Quantile (ta);
obj << Q(qu);
obj << Select Rows(All);Re: Display a text box asking for input from the userThanks @pmroz ,
The script work fine but the problem is it take the default values to evaluate the outliers not the input values. See the screen shot below
The following analysis is based on Tail Quantile of 0.1 and Q of 3. I entered 0.4. and 3 in the edit box. I tired using redo analysis but it doesn't selects all rows in the window. Any advice?
