Help with OnClose StatementsHi All,
I'm struggling with OnClose statements for adding items to a list when a data view table is closed. The idea is a user will select rows (already done in this script) and edit values on the data view, which will log the change to those values on a list variable when it's closed.
I'm not having much luck with this, even something as simple as DT<
Any help is appreciated!
Ben
names default to here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Select Rows( [5, 7, 8, 10] );
OG_tablerows=dt<<GET selected="" rows=""></GET>Re: Help with OnClose StatementsHi Ben,
The following will write the pre-change values to the list variables when the table is closed. I'm not seeing anything that checks for changes in your code. I'm assuming that will be added later?
dataview_window << Subscribe("",
onclose(
dataview_window << setdirty( 0 );
insert into(post_edit_xval_history, pre_edit_xval);
insert into(post_edit_Yval_history, pre_edit_Yval);
insert into(post_edit_row_history,pre_edit_rows);
insert into(movehistory, "Edited");
movecounter++;
1;
)
);Re: Help with OnClose StatementsHi @DonMcCormack ,
Works a treat, thank you very much! Yes I'll be using a separate part of the script to track changes.
Thanks,
Ben