How do I get entries from a list in a platform dialog window for later use?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) ));ScriptingRe: How do I get entries from a list in a platform dialog window for later use?This modification of your script, will set the variable YList when the Run Button is clicked.
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")));
r[listboxbox(2)]<<SET script=""></SET>Re: How do I get entries from a list in a platform dialog window for later use?Jim, thank you so much! I had tried adding a function to the "Run" button as well, but I see now that one has to use "set script". And, probably because it was embedded in a function, I could not get listboxbox(2) to be recognized.
When one adds a script to a button box on a dialog such as this one, do you know which runs first, the added script or the built in functionality? The fact that your script works would suggest that the added script runs first.
Thanks again - I really appreciate this help.
Re: How do I get entries from a list in a platform dialog window for later use?From what I can tell, your conclusion is correct. My limited experience with manipulation of JMP created dialog boxes suggests that any JSL applied to the objects, runs before the objects functionality is run.