cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Dib-Dey
Level III

get selected item from a List Box()

 

I have a GUI where _cbFilters is poupulated in from different list. Once the List Box is populated, I want to select the variable and pass it for some other us. But unable to do that. I tried get text() get selected etc...e..
Button Box( "Get DataBase Filter Column",
						 _cbFilters  << Remove all; 
						Database_column_type = radio << getSelected;
						if(Database_column_type == "AN_CDS",
								 _cbFilters  << Append(Mongo_list) ,																									
								 _cbFilters  << Append(SQLColumnFilters_BootLogParsed))
						),
_cbFilters = List Box()
columnFilter = _cbFilters << get selected;_

 

2 REPLIES 2
Dib-Dey
Level III

Re: get selected item from a List Box()

 

I'm running the simple code below and trying to get the selected item from List Box(). But it is giving me error saying:

Name Unresolved: SourceData in access or evaluation of 'SourceData' , SourceData/*###*/

 

x = {"abc", "cda"};
y={"123","345"};
selection = New Window( "Check",
	H List Box(
		Panel Box( "Select Database",
			radio = Radio Box( All_database_list, HideShowObject( radio ) ),
			Button Box( "Get DataBase Filter Column",
				_cbFilters << Remove all;
				Database_column_type = radio << getSelected;
				If( Database_column_type == "AN_CDS",
					_cbFilters << Append( x ),
					_cbFilters << Append( y )
				);
			),

		),
		FilterTxTBox = Text Box( "Columns: " ),
		_cbFilters  = List Box({" "},width(100),nlines(3),max selected( 1 )),
		Button Box("Done", SourceData = _cbFilters << GetSelected;),
		show(SourceData)
	),

);
pmroz
Super User

Re: get selected item from a List Box()

This approach is a bit simpler - I put actions directly into the radio box.

all_database_list = {"AN_CDS", "XYZ", "ABC"};

x = {"abc", "cda"};
y = {"123", "345"};
selection = New Window( "Check",
	H List Box(
		Panel Box( "Select Database",
			radio = Radio Box( All_database_list, 
				Database_column_type = radio << getSelected;
				If( Database_column_type == "AN_CDS",
					_cbFilters << set items( x ),
					_cbFilters << set items( y )
				);
			), 
		),
		FilterTxTBox = Text Box( "Columns: " ),
		_cbFilters = List Box( x, width( 100 ), nlines( 3 ), max selected( 1 ) ),
		Button Box( "Done", 
			SourceData = _cbFilters << GetSelected;
			Show( SourceData );
			selection << close window;
		),
	), 
);

Recommended Articles