cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to move from signal modeling to system modeling at the first JMP Aerospace Analytics webinar. Register. June 18, 1 p.m. US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
aidanweb
Level II

Giving options for user to select from, storing selection as string

Hi, here's my current code that displays a popup window for user input. 

aidanweb_0-1690678749857.png

 

 

I want it so that for Level:, they can choose between two options (each option having a box next to it that the user can tick to select one). What would I have to add to my code to get that? Here's a picture of what I want the "level" user input to look like:

aidanweb_1-1690678590732.png

Where the user can select one or the other before clicking "Save." Then, store "THIS" or "THAT" as a string depending on their selection. Thanks!

 

Note: If a dropdown menu is easier, that would work too. 

 

1 REPLY 1
txnelson
Super User

Re: Giving options for user to select from, storing selection as string

Here is a simple example to show you one way of handling this

Names Default To Here( 1 );

r1 = Radio Box( {"This"} );
r2 = Radio Box( {"That"} );
New Window( "Example",
	V List Box( H List Box( r1, r2 ) ),
	Button Box( "Save",
	show(r2<<get);
		If( r1 << get == 2,
			theSelection = "This",
			theSelection = "That"
		);
		show(theselection);
	)
);
r2 << Group( r1 );

txnelson_0-1690685474202.png

 

Jim

Recommended Articles