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
akuznetsovaapl
Level II

Calling Standardize Attributes function on multiple Columns in Scripting

Hi,

 

I'd like to be able to call Standardize Attributes on multiple columns in JSL scripting.

I tried searching but failed to find a function that would allow me to apply standardize attributes.

 

On a side note, if the above function exists, how can I retrieve a list of selected columns from a table. This would allow me to select the columns and then run the script to change Type from Character to Numerical Continuous for example.

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Calling Standardize Attributes function on multiple Columns in Scripting

I am not aware of a Standardize Attributes function in JSL.  I assume that because it is so simple to loop through a list of column to apply the same attribute, that it doesn't make sense to have a stand alone function.

To get a list of selected column just use

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Go To( :weight );
names = dt << Get Selected Columns;
Show( names );

The above example is taken directly from the Get Selected Columns entry from the Scripting Index.

     Help==>Scripting Index

Jim

View solution in original post

Re: Calling Standardize Attributes function on multiple Columns in Scripting

Please see Help > Books > Scripting Guide. There are chapters devoted to scripting data column objects. You will need to identify the column attributes that you want to change or set and then find the message that accomplishes the task. For example, I can change the format of the numeric data:

 

Names Default to Here( 1 );

// get example for the data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// change the format attribute
:height << Format( "Fixed Dec", 8, 3 );

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Calling Standardize Attributes function on multiple Columns in Scripting

I am not aware of a Standardize Attributes function in JSL.  I assume that because it is so simple to loop through a list of column to apply the same attribute, that it doesn't make sense to have a stand alone function.

To get a list of selected column just use

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Go To( :weight );
names = dt << Get Selected Columns;
Show( names );

The above example is taken directly from the Get Selected Columns entry from the Scripting Index.

     Help==>Scripting Index

Jim
akuznetsovaapl
Level II

Re: Calling Standardize Attributes function on multiple Columns in Scripting

I'm new and don't know where to look to change column attributes, can you please show me how/where?

Re: Calling Standardize Attributes function on multiple Columns in Scripting

Please see Help > Books > Scripting Guide. There are chapters devoted to scripting data column objects. You will need to identify the column attributes that you want to change or set and then find the message that accomplishes the task. For example, I can change the format of the numeric data:

 

Names Default to Here( 1 );

// get example for the data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// change the format attribute
:height << Format( "Fixed Dec", 8, 3 );