Yes exactly, I'd like the 12 filter to stay even if the table rows are updated with new data AND conditional is set to true
Right now JMP completely clears the data filter on table update when conditional is set to true. When conditional is off, everything is fine and the behavior is as expected.
So I have an existing graph and the user interacts with the graph to generate a new state for the main data table behind the graph, when the user commits the new state I create a new table with their changes and update the main table with the new table.
That event causes JMP to discard the filter selections they had made on the main table.
So what I would do is capture the data filter state before my update event, perform the update, then reset the data filter state so the user didn't notice that the filters were cleared in between.
This works totally fine for the data filter as long as "conditional" is set to false...
But I want conditional set to true because it provides useful data in the data filter about row counts that are relevant to what they are doing.
here's my example, why does this need to reset the filter? How can I prevent the user from experiencing the filter reset?
Names Default To Here( 1 );
dt = Open( "$sample_data\Iris.jmp" );
dt << New Column( "MY_COL", Character );
break_the_filter_fn = Function( {},
dt << select rows( {1, 2, 3, 4, 5} );
dt2 = dt << Subset( Output Table( "just_some_rows" ), Selected Rows( 1 ) );
dt2:MY_COL[{1, 2, 3, 4, 5}] = "banana";
dt << Update( with( dt2 ), Match Columns( :sepal length == :sepal length, ) );
//close(dt2,nosave);
);
a_window = New Window( "a_window",
H List Box(
MY_GRAPH_BUILDER = Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :Sepal length ), Y( :Sepal width ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
Local Data Filter(
Conditional,
Add Filter(
columns( :Species, :Sepal length, :Sepal width ),
Modeling Type( :Sepal length, Nominal ),
Modeling Type( :Sepal width, Nominal ),
Where( :Species == {"setosa", "versicolor"} ),
Where( :Sepal length == {5, 5.1, 5.2, 5.3, 5.4, 5.5} ),
Display( :Sepal length, N Items( 15 ), Find( Set Text( "" ) ) ),
Display( :Sepal width, N Items( 15 ) )
)
)
);
Panel Box( "a btn box",
Lineup Box( N Col( 1 ), Spacing( 3 ),
Button Box( "break the filter", break_the_filter_fn() )
)
);
)
);