cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
LipYeong
Level II

How to delimit multiple column with specific string in jsl

Hi,

 

I've a table that would like to delimit multiple column with specific string

Script below able to point to the specific column but unable to delimit the data

Appreciate if anyone could help on this. Thanks

 

 

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


headerList = dt << get column names( string );

For( i = 1, i <= N Items( headerList ), i++,

	If(  Contains(headerList[i], "sales"), 
		Column( dt, headerList[i] ) << text to columns( delimiter( "_" ));
	);
		
);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
pauldeen
Level VI

Re: How to delimit multiple column with specific string in jsl

You have to send that command to the table not the column. When you do, it inserts extra columns to the right so going left to right is going to break things. You need to go right to left (i-- instead of i++) This works:

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


headerList = dt << get column names( string );

For( i = N Items( headerList ), i>=1, i--,
	Data Table( "Sales" ) << Text to Columns(
		columns( Column(dt, i) ),
		Delimiters( "_" )
	);
		
);

View solution in original post

2 REPLIES 2
pauldeen
Level VI

Re: How to delimit multiple column with specific string in jsl

You have to send that command to the table not the column. When you do, it inserts extra columns to the right so going left to right is going to break things. You need to go right to left (i-- instead of i++) This works:

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


headerList = dt << get column names( string );

For( i = N Items( headerList ), i>=1, i--,
	Data Table( "Sales" ) << Text to Columns(
		columns( Column(dt, i) ),
		Delimiters( "_" )
	);
		
);
LipYeong
Level II

Re: How to delimit multiple column with specific string in jsl

Thanks Paul, this solution works. I've added the for loop into the if condition statement and it solved the issues. 

 

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

headerList = dt << get column names( string );

For( i = N Items( headerList ), i>=1, i--,
	If(  Contains(headerList[i], "CLASSHOT 1"), 
	dt << Text to Columns(columns( Column(dt, i) ),Delimiters( "_" ));
		
);
);

Recommended Articles