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

Sserializing column groups

Hi @txnelson ,

 

 want to assign numbers only to a particular group of columns.

For eg: In this case, I want to serialize the column group "Tests". There are more than 100 columns in the tests groups. Please can you help me with the jsl? 

Jacksmith12_0-1629817932581.png

Many thanks,

Jack

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Sserializing column groups

One just needs to get the list of columns in the data table group and then change the names.

Names Default To Here( 1 );
dt = Current Data Table();

theGroup = dt << get column group( "Tests" );

For( i = 1, i <= N Items( theGroup ), i++,
	theGroup[i] << set name( Char( i ) || ". " || char( theGroup[i] << get name ) )
);

txnelson_0-1629819846483.png

 

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Sserializing column groups

One just needs to get the list of columns in the data table group and then change the names.

Names Default To Here( 1 );
dt = Current Data Table();

theGroup = dt << get column group( "Tests" );

For( i = 1, i <= N Items( theGroup ), i++,
	theGroup[i] << set name( Char( i ) || ". " || char( theGroup[i] << get name ) )
);

txnelson_0-1629819846483.png

 

Jim