cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
matth1
Level IV

Data Table Box with local data filter

Bug, or user error?

If I create a Data Table Box using the following code:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "Demo Data Table Box",
	Data Filter Context Box(
		H List Box(
			dt << Data Filter(
				//Show Controls( 0 ),
				Local,
				//Add Filter( columns( :sex ) )
			), 
			dtb = data Table Box( dt )
		)
	)
);

then manually select 'sex' as the filter, the table box is filtered correctly. 

matth1_0-1707840742618.png

However, uncommenting lines 7 & 9 and running, the filter doesn't do anything:

matth1_1-1707840825882.png

Is this expected, or am I missing anything?

[Using JMP 17.2]

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Data Table Box with local data filter

I'm not sure if it's a feature or a bug, but I usually send messages to filters after I've created them. The script below works as you intend, I think.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "Demo Data Table Box",
	Data Filter Context Box(
		H List Box(
			dtf = dt << Data Filter(
				//Show Controls( 0 ),
				Local,
				//Add Filter( columns( :sex ) )
			), 
			dtb = data Table Box( dt )
		)
	)
);
dtf << show controls (0);
dtf << Add Filter (Columns (:sex));

View solution in original post

2 REPLIES 2

Re: Data Table Box with local data filter

I'm not sure if it's a feature or a bug, but I usually send messages to filters after I've created them. The script below works as you intend, I think.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "Demo Data Table Box",
	Data Filter Context Box(
		H List Box(
			dtf = dt << Data Filter(
				//Show Controls( 0 ),
				Local,
				//Add Filter( columns( :sex ) )
			), 
			dtb = data Table Box( dt )
		)
	)
);
dtf << show controls (0);
dtf << Add Filter (Columns (:sex));

Re: Data Table Box with local data filter

I would consider this a bug, and it will be fixed for a future JMP release.  Thanks @Jed_Campbell for the workaround - that is a reasonable solution to ensure that the filter connects to the Data Table Box.