After the user selects options in a window, you can extract those selections from the window using the Return Result message, Get message, or Get Selected message.
To have a New Window() script automatically return the results after the user clicks OK, include the Return Result message after the Modal message.
<<Modal,
<<Return Result,
33 // the user typed "33" in the number edit box
Include the Get message to return 1 for a selected check box and 0 for a deselected check box. To view the selection, add a Show() expression at the end of the script.
<<Modal,
val2 = kb2 << Get;
val3 = kb3 << Get;
Show( val1, val2, val3 ); // return variables after window closes
val1 = 1; // first and second checkboxes are selected
val3 = 0; // third checkbox is not selected
Include the Get Selected message to return the selected column names and then insert the columns in a Bivariate plot.
xvar = .;
yvar = .;
<<Modal,
<<On Validate(
x = Col List Box(
dt, // data table reference
all, // display all columns from the data table
y = Col List Box(
ycol = Column( dt, yvar );