<?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: Loop through the list and concate in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Loop-through-the-list-and-concate/m-p/641012#M83824</link>
    <description>&lt;P&gt;You are using wrong way of accessing the values in a list while using indices. Try changing () to [], for example uniq(i) -&amp;gt; uniq[i]&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 20:15:04 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-06-09T20:15:04Z</dc:date>
    <item>
      <title>Loop through the list and concate</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-the-list-and-concate/m-p/640997#M83822</link>
      <description>&lt;P&gt;Hello forks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to loop through the list and contact the string but it only reads the first value in the list.&lt;/P&gt;&lt;P&gt;Is there a workaround?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jackie__0-1686339753960.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/53674iBB680A8BCC3EF72E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jackie__0-1686339753960.png" alt="Jackie__0-1686339753960.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table(); 
//List 1
uniq = {"S", "V"};&lt;BR /&gt;//list 2
binnaming = {"Dummy", "Sigma"};
&lt;BR /&gt;Loop through the list to concede the strings and write to the data table rows
For( i = 1, i &amp;lt;= N Items( uniq ), i++,
	:Column 1[i] = "BIN = \!"" || Substr( Char( uniq( i ) ), 3, 1 ) || "\!" " || " \!"" ||
	Substr( Char( binnaming( i ) ), 3, Length( binnaming( i ) ) - 3 );
															

);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:43:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-the-list-and-concate/m-p/640997#M83822</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-09T19:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through the list and concate</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-the-list-and-concate/m-p/641012#M83824</link>
      <description>&lt;P&gt;You are using wrong way of accessing the values in a list while using indices. Try changing () to [], for example uniq(i) -&amp;gt; uniq[i]&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 20:15:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-the-list-and-concate/m-p/641012#M83824</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-06-09T20:15:04Z</dc:date>
    </item>
  </channel>
</rss>

