When you submit a script with a modal window, JMP draws the window, waits for the user to make choices and click OK, and then stores a list of the variables with their values. Any attempt to click outside the window produces an error sound, and script execution is suspended until the user clicks OK or Cancel.
The Column Dialog() function is specifically intended to prompt users to choose columns from the current (topmost) data table. Windows created by Column Dialog() are also modal windows.
win = New Window( "Set a Value",
	<<Modal,
	Text Box( "Set this value" ),
	variablebox = Number Edit Box( 42 ),
	Button Box( "OK" ),
	Button Box( "Cancel" )
);
Notice that the argument to Number Edit Box() is the default value, 42.
Sample Modal Display Box
If you click OK, the window closes and {Button(1)} is returned. To get the value entered in the box, use the Return Result message and a subscript into the window. Note that the deprecated Dialog() returns the list of variable assignments the same way.
win = New Window( "Set a Value",
	<<Modal,
	<<Return Result,
	Text Box( "Set this value" ),
	variablebox = Number Edit Box( 42 ),
	Button Box( "OK" ),
	Button Box( "Cancel" )
);
Write( win["variablebox"] );
// create a subscript to the variablebox variable
If you click Cancel, the window closes, it returns {Button(-1)}, and the script continues.
If( win["Button"] == 1,
	Print( win["variablebox"] );
	,
	Print("Canceled")
);
Note: Modal windows require at least one button for dismissing the window. You can use OK, Yes, No, or Cancel to label modal window buttons. If you do not include at least one of these buttons in a modal window, JMP adds an OK button.

Help created on 9/19/2017