<?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: Split Array in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348491#M59942</link>
    <description>&lt;P&gt;That would be read same as if you "removed" first quotes (as it is string) and replaced all \!" with single ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check log after running this script (and also created datatable, it will add a_string value to one cell)&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);

a_list =  {"c", "d", "e"};
show(a_list);
a_string = "\!"" || Concat Items(a_list, "\!",\!"") || "\!"";
show(a_string);
write("\!NWrite print: "||a_string);

dt = New Table("newtable",
	Add Rows(1),
	Compress File When Saved(1),
	New Column("col", Character, "Nominal", Set Values({""}))
);

column(dt, "col") &amp;lt;&amp;lt; Set Each Value(a_string);
write();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have had my challenges with strings in JMP and it has depended on the use case what I have had to do to manage with them to add quotes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2021 05:56:28 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-01-14T05:56:28Z</dc:date>
    <item>
      <title>Split Array</title>
      <link>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348232#M59922</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Any ideas how to split&amp;nbsp;a = {"c", "d","e"}; into a= {"c"}, {"d"},{"e"}; ? Currently when I did Concat Items (a, ","); , the output will be "c,d,e" instead of "c","d","e" .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Concat Items did apply after letter c. However, what if I want to concat "," before c such as ",c,d,e"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Is there any possibilities to combine semicolon together with other strings? For example, " " "|| water || bend || "," || " " " , thus the output will be "water bend,"&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:03:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348232#M59922</guid>
      <dc:creator>WanCine</dc:creator>
      <dc:date>2023-06-09T22:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Split Array</title>
      <link>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348255#M59926</link>
      <description>&lt;P&gt;You can escape quotes with \!"&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);

a =  {"c", "d", "e"};
a = "\!"" || Concat Items(a, "\!",\!"") || "\!"";
write(a);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also check out &lt;A href="https://www.jmp.com/support/help/en/15.2/index.shtml#page/jmp/jsl-syntax-rules.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/15.2/index.shtml#page/jmp/jsl-syntax-rules.shtml&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 20:22:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348255#M59926</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-01-13T20:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Split Array</title>
      <link>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348259#M59927</link>
      <description>&lt;P&gt;Hi Jthi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I believe your reply refer to question no.3 only. I did try that&amp;nbsp;&lt;SPAN&gt;\!" earlier. But when check the return value, it shown as below figure. So, this return value should be read as "c, d, e" and not as per shown below. Correct me if I am wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WanCine_0-1610569851429.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29412i683F80A917AE0F1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WanCine_0-1610569851429.png" alt="WanCine_0-1610569851429.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2021 20:35:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348259#M59927</guid>
      <dc:creator>WanCine</dc:creator>
      <dc:date>2021-01-13T20:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Split Array</title>
      <link>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348491#M59942</link>
      <description>&lt;P&gt;That would be read same as if you "removed" first quotes (as it is string) and replaced all \!" with single ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check log after running this script (and also created datatable, it will add a_string value to one cell)&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);

a_list =  {"c", "d", "e"};
show(a_list);
a_string = "\!"" || Concat Items(a_list, "\!",\!"") || "\!"";
show(a_string);
write("\!NWrite print: "||a_string);

dt = New Table("newtable",
	Add Rows(1),
	Compress File When Saved(1),
	New Column("col", Character, "Nominal", Set Values({""}))
);

column(dt, "col") &amp;lt;&amp;lt; Set Each Value(a_string);
write();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have had my challenges with strings in JMP and it has depended on the use case what I have had to do to manage with them to add quotes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 05:56:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348491#M59942</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-01-14T05:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Split Array</title>
      <link>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348601#M59953</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/21641"&gt;@WanCine&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Any ideas how to split&amp;nbsp;a = {"c", "d","e"}; into a= {"c"}, {"d"},{"e"}; ? Currently when I did Concat Items (a, ","); , the output will be "c,d,e" instead of "c","d","e" .&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm having trouble making sense of this question because&amp;nbsp;a= {"c"}, {"d"},{"e"}; isn't valid JSL. There's no data structure which will hold three separate lists like that. Can you clarify exactly what you're trying to do?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;2. Concat Items did apply after letter c. However, what if I want to concat "," before c such as ",c,d,e"?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;a = {"c", "d", "e"};

z = "," || Concat Items( a, "," );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;3. Is there any possibilities to combine semicolon together with other strings? For example, " " "|| water || bend || "," || " " " , thus the output will be "water bend,"&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;pointed out that you can escape quotation marks with \!".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;foo = " \!" "|| "water " || "bend" || "," || " \!" ";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 14:33:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Split-Array/m-p/348601#M59953</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2021-01-14T14:33:26Z</dc:date>
    </item>
  </channel>
</rss>

