I am trying to obtain the list of columns that a user enters in the Y list box in Fit Model. This list of Y's will subsequently be used in a script that executes once the Run button is pressed.
Here is one of many failed attempts. Once you run the script, select some Y's. The script that is placed in the Y button returns "yList = {}". From other attempts, I believe that the Y button first adds the selected columns, and then runs the script that I added.
In any case, there is something very basic that I don't understand. Any help would be greatly appreciated!
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Diabetes.jmp" );
// Open Fit Model as a report, in order to be able to add scripts to button boxes.
r = Report(Fit Model(Personality("Stepwise")));
YButton = r[Button Box(1)]; // Button Box (1) is the "Y" button
// Add a script to that button box. This doesn't work, though. List Box (9) is the list of Y's.
YButton << Set Function(Function({}, yList = List Box(9) << Get Items(); Show(yList) ));