<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to delimit multiple column with specific string in jsl in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-delimit-multiple-column-with-specific-string-in-jsl/m-p/543842#M76273</link>
    <description>&lt;P&gt;Thanks Paul, this solution works. I've added the for loop into the if condition statement and it solved the issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Data Table( "MTL");

headerList = dt &amp;lt;&amp;lt; get column names( string );

For( i = N Items( headerList ), i&amp;gt;=1, i--,
	If(  Contains(headerList[i], "CLASSHOT 1"), 
	dt &amp;lt;&amp;lt; Text to Columns(columns( Column(dt, i) ),Delimiters( "_" ));
		
);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Sep 2022 01:44:49 GMT</pubDate>
    <dc:creator>LipYeong</dc:creator>
    <dc:date>2022-09-13T01:44:49Z</dc:date>
    <item>
      <title>How to delimit multiple column with specific string in jsl</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-delimit-multiple-column-with-specific-string-in-jsl/m-p/543471#M76244</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've a table that would like to delimit&amp;nbsp;multiple column with specific string&lt;/P&gt;&lt;P&gt;Script below able to point to the specific column but unable to delimit the data&lt;/P&gt;&lt;P&gt;Appreciate if anyone could help on this. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Data Table( "Sales");


headerList = dt &amp;lt;&amp;lt; get column names( string );

For( i = 1, i &amp;lt;= N Items( headerList ), i++,

	If(  Contains(headerList[i], "sales"), 
		Column( dt, headerList[i] ) &amp;lt;&amp;lt; text to columns( delimiter( "_" ));
	);
		
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:54:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-delimit-multiple-column-with-specific-string-in-jsl/m-p/543471#M76244</guid>
      <dc:creator>LipYeong</dc:creator>
      <dc:date>2023-06-10T23:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to delimit multiple column with specific string in jsl</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-delimit-multiple-column-with-specific-string-in-jsl/m-p/543509#M76247</link>
      <description>&lt;P&gt;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:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Data Table( "Sales");


headerList = dt &amp;lt;&amp;lt; get column names( string );

For( i = N Items( headerList ), i&amp;gt;=1, i--,
	Data Table( "Sales" ) &amp;lt;&amp;lt; Text to Columns(
		columns( Column(dt, i) ),
		Delimiters( "_" )
	);
		
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Sep 2022 10:05:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-delimit-multiple-column-with-specific-string-in-jsl/m-p/543509#M76247</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2022-09-12T10:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to delimit multiple column with specific string in jsl</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-delimit-multiple-column-with-specific-string-in-jsl/m-p/543842#M76273</link>
      <description>&lt;P&gt;Thanks Paul, this solution works. I've added the for loop into the if condition statement and it solved the issues.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Data Table( "MTL");

headerList = dt &amp;lt;&amp;lt; get column names( string );

For( i = N Items( headerList ), i&amp;gt;=1, i--,
	If(  Contains(headerList[i], "CLASSHOT 1"), 
	dt &amp;lt;&amp;lt; Text to Columns(columns( Column(dt, i) ),Delimiters( "_" ));
		
);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Sep 2022 01:44:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-delimit-multiple-column-with-specific-string-in-jsl/m-p/543842#M76273</guid>
      <dc:creator>LipYeong</dc:creator>
      <dc:date>2022-09-13T01:44:49Z</dc:date>
    </item>
  </channel>
</rss>

