cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
claude_bellavan
Level III

A JSL script for moving columns to original order?

Hello,

Is there a way to script this menu command: Columns/Reorder Columns/Original Order .

In the JSL manual, I found :

  • dt<<Reorder By Name
  • dt<<Reorder By Data Type
  • dt<<Reorder By Modeling Type

In need to restore the column order to orignal order before Data Table update and reorder it by name after the update.

Thanks,

Claude B.

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: A JSL script for moving columns to original order?

It's simply

dt << Original Order;


View solution in original post

4 REPLIES 4
ian_jmp
Staff

Re: A JSL script for moving columns to original order?

It's unusual to have a menu command without a JSL equivalent. But if it's not there (I didn't check), you can make use of 'MainMenu()':

dt = Open("$SAMPLE_DATA/Big Class.jmp");

Wait(3);

dt << ReorderByName;

Wait(3);

dt = CurrentDataTable();

MainMenu("Cols:Reorder Columns:Original Order");


ms
Super User (Alumni) ms
Super User (Alumni)

Re: A JSL script for moving columns to original order?

It's simply

dt << Original Order;


ian_jmp
Staff

Re: A JSL script for moving columns to original order?

The best place to check out this kind of stuff is 'Help > Scripting Index', which usually has useful examples too, should you need them:

10601_Screen Shot 2015-12-07 at 08.49.27.png

Clearly I need to use it more often myself . . .

claude_bellavan
Level III

Re: A JSL script for moving columns to original order?

Thank you very much!

Both responses will be very useful in the future.

Claude