Populating/Expand UI based on a selectionAll,
I found this post and example very relevant to my needs. https://community.jmp.com/t5/Discussions/Creating-drop-down-menu-for-interactive-user-input/td-p/17982. However, as I try to implement/execute the code piece provided here, I don't see what I expected to happen. I think it is a typo, provided is my edited - working code.
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
/* Extract a list of unique ages */
Summarize( a = By( :age ) );
Insert Into( a, "<SELECT age="">", 1 );
/* Create a modal dialog */
New Window( "Example",
<<MODAL>", 1 );
cb2 << Set Items( ageNames );
)
)
)
),
/* Print the selected values from both ComboBoxes in the log */
Panel Box( "Select a Name:",
cb2 = Combo Box(
{"</MODAL></SELECT><SELECT name="">"},
<<SETFUNCTION></SETFUNCTION></SELECT>
Looking at the code and reading through it, I was hoping once the user selects an age in the first Combo Box, the second Combo Box should be populated with the names of people with that age. However, I don't see that happening here with the original code. This above code fixes it.

Is this the best way to handle this - Or are there other options ?
Re: Populating/Expand UI based on a selection@txnelson,
Hello Jim,
I could get the code sample from the other discussion to work even whille the window is Modal. The issue was in the original discussion, the code is not subsetting the selecting rows, which I added. However, I am wondering if this is the best way to do this or are there any better solutions ?
Re: Populating/Expand UI based on a selectionThe "Modal" window is not letting the flow of your code work. If you change the window to a non modal window the code works as you described you want it to work.. I have added to your script to make it work the way you want it, without it being a modal window.
Names Default To Here( 1 );
Clear Symbols();
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
/* Extract a list of unique ages */
Summarize( a = By( :age ) );
Insert Into( a, "<SELECT age="">", 1 );
/* Create a modal dialog */
nw = New Window( "Example",
// <<MODAL>", 1 );
cb2 << Set Items( ageNames );
)
)
)
),
/* Print the selected values from both ComboBoxes in the log */
Panel Box( "Select a Name:",
cb2 = Combo Box(
{"</MODAL></SELECT><SELECT name="">"},
<<SETFUNCTION></SETFUNCTION></SELECT>