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 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 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 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 !