Given a list of values I want to write these to the limits of a local data filter. Here is a (almost) working example (remove data filter and re-add based on building the data filter expression dynamically) but it feels to complicated, is this the best way to do it? (It has to work dynamically for other tables with different number of columns as well)
dt = Open("$SAMPLE_DATA\Fitness 3D.jmp");
sm = dt << Scatterplot Matrix(
Y( :Runtime, :RstPulse, :RunPulse, :MaxPulse ),
X( :Age, :Weight, :Oxy ),
Fit Line( 0 ),
Local Data Filter( Add Filter( columns( :Age, :Weight, :Oxy ) ) )
);
ColExp = expr(columns( :Age, :Weight, :Oxy ));
//Modify this expression based on list values
AndExp = expr(Where(:Age >=0 & :Age <=100));
sm << Remove Local Data Filter;
Eval(
Insert(
Expr( Send( sm ) ),
Insert(
Expr( Local Data Filter() ),
Insert(
insert(
expr(Add filter()),
name expr(ColExp)
),
//name expr(WhereExp)
insert(
expr(Where()),
name expr(AndExp)
)
)
)
)
);
For a stretch goal I would like to also append a button that on press reads the current limits from the local data filter into a list or matrix.