Loop through the check boxes to get the valuesHi All,
I want to generate an overlay plot using my script. The plot is overlaid by the “Device_Type” column in my data table. However, I would like to let the user choose which device type they want to include in the overlay plot. Therefore, I want to create a list of checkboxes in the user interface. Here is my code:
Close All( Data Tables, NoSave );//close all previous windows
dt1 = Open("data_device.jmp");
//extract a list of unique device types
Summarize( dt1, byDevice = by( :Device_Type ) );
//user interface
stop_flag = 0;
win = New Window("user interface",
<<MODAL></MODAL>The checkboxes can be created successfully as below, but I was wondering how could I loop through the checkboxes to get the value for each checkbox?

Any help would be really appreciated!
Automation and ScriptingData AccessData Exploration and VisualizationMass CustomizationQuality and Process EngineeringRe: Loop through the check boxes to get the valuesI've fixed that! Thanks a lot!
Re: Loop through the check boxes to get the valuesIt helps a lot! Thank you so much!
Re: Loop through the check boxes to get the valuesIf, for whatever reason, you still want to use the check boxes in your window, you do not need to iterate over each box if you use the default vertical orientation:
Names Default to Here( 1 );
items = { "One", "Two", "Three" };
New Window( "Check This", << Modal,
Panel Box( "Items",
cb = Check Box( items )
),
H List Box(
Button Box( "OK",
which = cb << Get Selected;
where = cb << Get Selected Indices;
)
)
);
Show( which, where );Re: Loop through the check boxes to get the valuesPlease paste a copy of the JSL into your response using the
so that the community can just copy and paste into JMP to work on your discussion item. You can also attach the JSL as a separate file. Otherwise, each Community member will have to manually retype in your JSL in order to work on it.
You may also want to rethink your approach. I believe you can get what you want using a Local Data Filter, which would allow the user to Dynamically change the Overlay plot rather than just allowing one setting and then having to rerun the code to make a different selection of devices
.