cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
shampton82
Level VII

Column filter above a col list box

Is there a way to get the column filter to show up above a col list box?  Right now I have to use the Column Dialog window to get it which is annoying as it is not as nice to work with as a new window().

 

Thanks for any advice!

 

Steve

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Column filter above a col list box

Hi @shampton82 - the box shown above is a FilterColSelector:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" );
New Window( "Filter Col Selector Example",
	Filter Col Selector( width( 250 ) )
);

The filter field will only show initially if there are more columns than can be shown.

View solution in original post

6 REPLIES 6
txnelson
Super User

Re: Column filter above a col list box

is this what you are talking about

txnelson_0-1649453159672.png

This example comes from the scripting guide for Col List Box()

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Col List Box Example",
	Col List Box( all, width( 250 ), maxSelected( 1 ) ),
	fontobj = lb = Col List Box()
);
Jim
shampton82
Level VII

Re: Column filter above a col list box

Thanks for the quick reply Jim,

Close but not quite, looking for this:

shampton82_0-1649456109906.png

 

Re: Column filter above a col list box

Hi @shampton82 - the box shown above is a FilterColSelector:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" );
New Window( "Filter Col Selector Example",
	Filter Col Selector( width( 250 ) )
);

The filter field will only show initially if there are more columns than can be shown.

ErraticAttack
Level VI

Re: Column filter above a col list box

That does not work for JMP14 (the filter is hidden by default for JMP14).  You can manually toggle the filter by using the display tree:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" );
New Window( "Filter Col Selector Example",
	fcs = Filter Col Selector( width( 250 ) )
);
fcs[If Box( 1 )] << Set( 1 )
Jordan
jthi
Super User

Re: Column filter above a col list box

I have been using similar method as @ErraticAttack demonstrated to get "col list box" (filter col selector) to easily get filterable column listing.

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = New Window("",
	flc = Filter Col Selector(dt, nlines(10)),
	((flc << Parent) << Xpath("//IfBox")) << set(1)
);

 

 Filter col selector can also be used to create "lazy" filterable list to limit selections from columns, by first creating a data table with column names as the possible options

Names Default To Here(1);
dt_temp = Open("$SAMPLE_DATA/Big Class.jmp", invisible);

dt_filter = dt_temp << Split(
	output table("filter table"),
	Split By(:name),
	Split(:name),
	Remaining Columns(Drop All),
	Sort by Column Property,
	invisible
);
Close(dt_temp, no save);

nw = New Window("filterable list", << modal,
	V List Box(
		fcs = Filter Col Selector(dt_filter, nlines(10)),
		((fcs << Parent) << Xpath("//IfBox")) << set(1),
		H List Box(
			Button Box("OK", sel = fcs << Get selected),
			Button Box("Cancel")
		)
	);
	
);
Close(dt_filter, no save);
show(sel);
-Jarmo
shampton82
Level VII

Re: Column filter above a col list box

Thanks for all the examples!