cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

Data filter for drop down box

Hi, all. There might be similar questions here,  but I didn't find one that solves my problem.

On the dashboard, I made inputs into a drop down box. i want the output table to change when I select different inputs. 

What functions should I use and is there a sample somewhere?

Thank you so much!

1 REPLY 1

Re: Data filter for drop down box

You can use the << Set function. Please refer to the following page.

https://community.jmp.com/t5/JMP-Knowledge-Base/How-to-dynamically-populate-a-ComboBox-based-upon-us... 

Here is an example.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

make_tabulate_script = Function( {col},
	tablate_script = Parse(
		Eval Insert(
			"dt << Tabulate(
		Show Control Panel( 0 ),
		Add Table(
			Column Table( Analysis Columns( ^col^ ), Statistics( Mean ) ),
			Row Table( Grouping Columns( :sex ) )
		)
	)"
		)
	);
	Eval Expr( tablate_script );
);

tablate_script = make_tabulate_script( ":height" );

nw = New Window( "new window",
	vb1 = H List Box(
		V List Box(
			Text Box( "Please Slect" ),
			cb = Combo Box(
				{":height", ":weight"},
				<<set function(
					Function( {this, index},
						Try( table << delete );
						Match( index,
							1,
								tablate_script = make_tabulate_script( ":height" );
								vb1 << append( table = Eval( tablate_script ) );,
							2,
								tablate_script = make_tabulate_script( ":weight" );
								vb1 << append( table = Eval( tablate_script ) );
						);
					)
				)
			)
		),
		table = Eval( tablate_script )
	)
);

Recommended Articles