Is it possible to apply a row state handler to a data table and make that handler continue to work if the data table is changed; for example, if a column is sorted by a script or interactively by a user?
I currently have two tables of data: one table with summary statistics, one with raw data. The user selects a row in the summary table, the row state handler detects which row is selected, extracts the parameter name and creates a chart from the raw data table using the parameter selected.
It works OK (although it does pick up the row that's been deselected at first before then finding the newly selected row), however it breaks if the user sorts the summary table (e.g. if they want to look at lowest Cpk, or some other metric).
I see the same issue in the following simple example based on the scripting help:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
f = Function( {a}, Print( a ) );
rs = dt << make row state handler( f );
dt << Select Rows( 1 );
dt << sort( by( :weight ), replace table, order( ascending ) );
dt << Select Rows( 9 );Output is:
Scriptable[]
[1]
I think this may be related to this wish list item: https://community.jmp.com/t5/JMP-Wish-List/Improve-JMP-s-state-handlers-hover-label-row-state-handler/idi-p/527992. Is there any workaround?
I am using JMP17.0 on MacOS.
Thank you!