Subscribe Bookmark RSS Feed

Rename a column jsl script

Highlighted
DKI

Occasional Contributor

Joined:

Feb 13, 2017

Hi 

 

I am pretty new to JSL scripting. I cant seem to find a script to rename of a column header from one name to another

Appologies this is probably obvious to most here

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Here is an example from

     Help==>Scripting Index==>Data Table==>Column Scripting

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
:Age << Set Name( "Time" );

 

Jim
3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Here is an example from

     Help==>Scripting Index==>Data Table==>Column Scripting

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
:Age << Set Name( "Time" );

 

Jim
DKI

Occasional Contributor

Joined:

Feb 13, 2017

Thanks alot Jim

Thats exactly what I needed. I was using a variation on that script that I had been messing around with for ages and could not make it work. 

Thanks also for showing where you found it.

markbailey

Staff

Joined:

Jun 23, 2011

In the future, you might find the on-line help useful. In this case:

  1. Select Help > Scripting Index.
  2. Change the drop-down menu from initial All Categories to Objects.
  3. Select Column Scripting under Data Table in the first list.
  4. Select Set Name in the second list.

You will find the correct syntax with arguments and options. You can run an example and observe the result. You can click Topic Help to go to the more complete coverage in the main help system.

You can also search in Objects with column name for example to find all related functions or messages.

Learn it once, use it forever!