For the latest version of JMP Help, visit JMP.com/help.

Send the Set Selected message to select a column.
col << Set Selected( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
 
colList = dt << Get Column Names( String );
 
For( i = 1, i <= N Cols( dt ), i++,
	If( Contains( colList[i], "NPN" ), // select only columns with NPN
	// in the name
		Column( colList[i] ) << Set Selected( 1 )
	)
);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
:age << Set Selected( 1 );
:sex << Set Selected( 1 );
dt << Get Selected Columns();
{:age, :sex}
dt << Get Selected Columns( "string" );
{"age", "sex", "height"}
To actually select the columns before getting the columns, send the Set Selected message to a column. For more information, see Column Attributes.
dt << Go To( column name | column number );
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
dt << Go To( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:age << Set Selected( 1 );
dt:height << Set Selected( 1 );
Wait( 1 );
b = dt << Invert Column Selection;
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
a = {:height, :weight};
b = dt << Invert Column Selection( a );

Help created on 3/19/2020