cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Add Original order property/columm to JMP datatables on open/creation

From time to time I would like to re-order my data how it did look when I did open it. I can do this if I remember to create column "Order" when I open the table, but I would like to have Preference in JMP which would allow me to have this created automatically either as Column or possibly some table property which would allow me to create the column when needed. 

 

Example how I currently handle it (with addin or script with shortcut):

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

If(N Items(Get Data Table List()) == 0,
	Throw("No datatables open");
);

new_col =  Current Data Table() << New Column("ORIGINAL_ROW", Numeric, Ordinal, Hide, Exclude,
	<< Set Each Value(Row());
);
Current Data Table() << Move Selected Columns(new_col, to First);

Not sure how subsetting and such should be handled, but maybe the original order could be left there and new created due to subsetting?