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 create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

Data Filter structure and orientation in JMP19

Hello everyone,

I am currently working on a data extraction interface using a Data Filter. I can build it, the problem is with the layout of the columns in my filter in JMP19.

 

In JMP17, the columns of the filters are inside a LineUpBox(). The LineUpBox have two useful functions, N Col and Spacing, that allow me to arrange my columns across multiple lines, with a space between the columns.

Tree Structure of the Data Filter in JMP17Tree Structure of the Data Filter in JMP17

 

 

 

 

 

 

However, in JMP19, the Tree Structure of the Data Filter changed : the LineUpBox() has been move upward and the parent of the columns is a List Box() that does not have N Col() and Spacing() functions. I can do the function << Set Horizontal(1), but I am limited on one line only and the display is not great.

(Maybe the change was in JMP18, i did not tried in this version).

Tree Structure in JMP19Tree Structure in JMP19

 

 

 

 

Do you have an idea on how I can arrange the columns of my filter in JMP19 as well as in JMP17 ?

I tried to create a new LineUpBox() inside and to move the Border Boxes as children but I lost the filtering and could not easily delete the old ones. I know I might be able to have something similar by creating myself a New Window() with a List Box() for each column of the filter, but I like to use the Data Filter for the Conditional property and the fact that I can easily use it with different tables and different columns.

 

Below is an example with two columns (but in reality I can have more). It will work in JMP17 (the two columns are displayed horizontally) but not in JMP19.

Window from JMP17Window from JMP17

 

 

 

 

 

 

 

 

 

 

f_extraction = Function({dt, cols_list, nbColsLine = 2, spacingLine = 30},	
	my_window = New Window("Extraction with filter",		
		Border Box(
			Left(20), Top(10), Right(20), Bottom(10),
			V List Box(			
				Panel Box("",
					Eval(
						Eval Expr(
							// Creation of the Data Filter, with two columns as an example
							df = dt << Data Filter(
								Show Counts(0),
								Conditional(1),
								Show Histograms and Bars(0),
								Add Filter(
									Columns(Expr(cols_list)),
									Display(cols_list, "List Display"),
								)
							)				
						)
					);
					
					// Here, the columns of the filter are reorderer in two columns with a space of 30 between them
					// This is where I have the problem in JMP19 compared to JMP17 because the Tree Structure is different
					(df << report)[Lineup Box( 2 )] << N Col( nbColsLine );
					(df << report)[Lineup Box( 2 )] << Spacing( spacingLine );
					For( i = 1, i <= N Items( cols_list ), i++,
						(df << report)[ListBoxBox( i )] << Set Size( 180, 220 )
					);
					
					// We delete some buttons and check boxes that we don't need
					(df << report)[Button Box( 4 )] << Delete;
					(df << report)[Button Box( 3 )] << Delete;
					(df << report)[Button Box( 2 )] << Delete;
					(df << report)[CheckBoxBox( 4 )] << Delete;
					(df << report)[CheckBoxBox( 3 )] << Delete;
					(df << report)[CheckBoxBox( 2 )] << Delete;
					(df << report)[CheckBoxBox( 1 )] << Delete;
					(df << report)[Outline Box( 1 )] << Set Title( "Data Table Filters" );
				),
				
				Spacer Box(Size(0, 20)),
				
				Button Box("OK",
					// Script where I retrieve the user selection
				)
			)
		)
	)
);

// Example
Try(Close(Data Table("Big Class"), No Save));
dt = Open( "$SAMPLE_DATA/Big Class.jmp", Invisible);
f_extraction(dt, {"sex", "name"})

Thanks for your help !

2 REPLIES 2
jthi
Super User

Re: Data Filter structure and orientation in JMP19

Too bad relying on this type of structure can quite easily break, https://www.hyrumslaw.com/.

I don't think there are any easy solutions that you can get to by just modifying the display boxes. Data Filter structure change has also broken few UIs in my add-ins I manage at work but for a different reason and it will be (hopefully...) easier to deal with than trying to organize filters into a grid.

JMP18 on the left and JMP19 on the right

image.png

 

-Jarmo
CorentinL
Level II

Re: Data Filter structure and orientation in JMP19

Yes, I know this not the best to work around these structures that might changed !

I guess I will leave it as it is for now, thanks for sharing your experience :)

Recommended Articles