Single Category Disply within an Eval( Eval Expr( Data Filter BoxHappy New Year to everyone!
I stumbled onto a nifty piece of code using Eval( Eval Expr( to make filter boxes generic in nature meaning I can just populate a list and the filter box would represent all the columns in a given data table. In some of my tables i have up to 25 different filter combinations and I like to use 'Single Category Display' them. However when i use the Eval( Eval Expr( only the first name in the list gets the 'Single Category' and the rest end up being a list. Is there a way that i can make all of them a Single Category?
I attached a sample script using the Semiconductor Capability Data Table. When you run the script you will see in the data filter context box (data filter) only the lot_id is single category and not the wafer. I am seeking to have both of them (or any combinations) single category.
Note: Credit goes to Mr. txnelson for helping me with the actual expression for the Distribution Plots.
Thanks in Advance
ScriptingRe: Single Category Disply within an Eval( Eval Expr( Data Filter BoxYou could make slight modification like this (note dtFilter variable inside Eval):
Eval(
Eval Expr(
dfcb100_S = Data Filter Context Box(
filter100_S = H List Box(
graph_vlb100_S = V List Box(
Lineup Box( N Col( 1 ),
Border Box( Sides( 15 ),
dtFilter = dt << Data Filter(
Local,
Mode( Show( 0 ) ),
Add Filter(
Columns( Expr( filterCol ) )
)
)
)
)
)
)
)
)
);
for(i = 1, i <= N Items(filterCol), i++,
dtFilter << Display(filterCol[i], Size( 188, 16 ), Height( 16 ), "Single Category Display" )
);I think Add Filter might not allow you to add multiple Displays at the same time as this did also work:
Eval(
Eval Expr(
dfcb100_S = Data Filter Context Box(
filter100_S = H List Box(
graph_vlb100_S = V List Box(
Lineup Box( N Col( 1 ),
Border Box( Sides( 15 ),
dt << Data Filter(
Local,
Mode( Show( 0 ) ),
Add Filter(
Columns( Expr( filterCol ) ),
Display( Expr( filterCol[1] ), Size( 188, 16 ), Height( 16 ), "Single Category Display" ),
Display( Expr( filterCol[2] ), Size( 188, 16 ), Height( 16 ), "Single Category Display" )
)
)
)
)
)
)
)
)
);Re: Single Category Disply within an Eval( Eval Expr( Data Filter BoxIn fact it seems that you can do it just be leaving out the Expr( filterCol ) in Display():
Eval(
Eval Expr(
dfcb100_S = Data Filter Context Box(
filter100_S = H List Box(
graph_vlb100_S = V List Box(
Lineup Box( N Col( 1 ),
Border Box( Sides( 15 ),
dt << Data Filter(
Local,
Mode( Show( 0 ) ),
Add Filter(
Columns( Expr( filterCol ) ),
Display(Size( 188, 16 ), Height( 16 ), "Single Category Display")
)
)
)
)
)
)
)
)
);Re: Single Category Disply within an Eval( Eval Expr( Data Filter BoxI have the sense that the JSL above may be over complicated. You could do something like this:
NamesDefaultToHere(1);
dt = Open( "$sample_data/Semiconductor Capability.jmp" );
// Columns to filter by (in a list)
filterCol = {"lot_id", "wafer"};
// Example report
dist = dt << Distribution(
Stack( 1 ),
Continuous Distribution(
Column( :NPN1 ),
Quantiles( 0 ),
Horizontal Layout( 1 ),
Vertical( 0 ),
Process Capability( Use Column Property Specs )
),
Automatic Recalc( 1 )
);
// Add a data filter
df = dist << Local Data Filter(Add Filter(columns( Eval(filterCol) )));
// Change the display format of all the filter variables
for(c=1, c<=NItems(filterCol), c++, df << Display( Eval(filterCol[c]), "Single Category Display" ));