Overview
This example demonstrates how you can dynamically populate a ComboBox with options that are relevant to a user selection made in a previous ListBox.
Instructions
In a JMP® session, click the File menu and select New ► Script. Copy the below script and paste it into the script window. To run the sample script, click the Edit menu and select Run Script.
/* Open a sample data table */
dt = Open( "$SAMPLE_DATA\Big Class.jmp", "Invisible" );
/* Extract a list of unique ages */
Summarize( a = By( :age ) );
/* Create a modal dialog */
New Window( "Example",
<<MODAL>", 1 );
cb2 << Set Items( ageNames );
)
)
)
), /* Print the selected values from the ListBox and ComboBox in the log */
Panel Box( "Select a Name:",
cb2 = Combo Box(
{"<SELECT name="">"},
<<SETFUNCTION></SETFUNCTION></SELECT></MODAL>
Additional Documentation
More information about the JMP Scripting Language can be found in the JMP Scripting Guide. You can access the guide from within JMP by clicking on the Help menu and select JMP Help. From the online Table of Contents, choose Scripting Guide.
[Previously JMP Note 54614]