@Rajat,
Most of the JMP Scripting Language, JSL, objects and functions for building custom dialogs target table columns. Consider the JMP built-in dialog windows are requesting columns. There are objects that can be used for custom selection, but these "values" objects typically require more programming. For example, a ColListBox object has a builtin drag and drop interface: a column name can be dragged to another ColListBox, and the column names will be unique.
JSL does provide ListBox() objects, however, it is now the scripters job to ensure uniqueness. For example, depending upon how you code the task, you have to manage that Football has just one classification and that te name is used once.
One method is to not use a dialog, but create a table summary of unique games and the Game Type, have the user update this shortened table then update the source table. This method is similar to older database update interfaces.
I have attached a very simple and not so elegant (repeated, brute force code) script to complete the described task. I kept it simple since you have not read the book. The script interface includes a remove button, in case a game was accidentally selected for an incorrect type. Instead of creating a union function, so the list of games have no duplicates, and functions to ensure a game is not classified as both indoor and outdoor, I built the code to remove the game from the source list once a category has been selected.
You should read about the Associative Array, a keyed list, ListBox, ButtonBox and Set Function().
Below is a screen shot of the dialog and the dialog portion of the script. The full script is attached. Note this could be done with a DataFilterBox, but the ListBox() is easier to use. BTW this was tested on JMP13 and 14.
![image.png image.png](https://community.jmp.com/t5/image/serverpage/image-id/19512iD8A3A3AD286C652A/image-size/large?v=v2&px=999)
//--Dialog
usr = New Window("Using List Boxes", <<Modal,
HListBox(
PanelBox("Source Values",
slb = ListBox(wkList)
),
PanelBox("Cast Type",
lineupBox(ncol(2),
bb1 = ButtonBox("Indoor", <<setFunction(gSelect) ),
lb1 = ListBox(idList),
bb2 = ButtonBox("Outdoor", <<setFunction(gSelect) ),
lb2 = ListBox(odList),
bb3 = ButtonBox("Nothing", <<setFunction(gSelect) ),
lb3 = ListBox(noList)
)
),
PanelBox("Action",
LineupBox(ncol(1),
bbok = ButtonBox("OK", onOK),
bbup = ButtonBox("Remove", onRmv)
))
)
);