There may be better ways to do this, but here is my take on it. If you create a separate window, with just a Button Box() in it, clicking on the button will run a simple script that can change the filter
Here is the script that produces the above example
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dis = dt << Distribution( continuous Distribution( Column( :height ) ) );
lf = dis << Local Data Filter( Add Filter( columns( :name ), Mode( Show( 1 ), Include( 1 ) ) ) );
nw = New Window( "Set Values",
Button Box( "Click to Set Selection From Selected Rows",
theRows = dt << get selected rows;
If( N Rows( theRows ) > 0,
theWhere = ":name == \!"" || dt:Name[theRows[1]] || "\!"";
For( i = 2, i <= N Rows( theRows ), i++,
theWhere = theWhere || " | :name == \!"" || dt:Name[theRows[i]] || "\!""
);
lf << delete all;
Eval( Parse( "lf << add filter (Columns (:name), where( " || theWhere || " ) );" ) ),
lf << delete all;
lf << add Filter ( Columns (:name));
);
)
);
Jim