<?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 do I make text box to a List for sql query in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60059#M32804</link>
    <description>&lt;P&gt;The issue is, that&amp;nbsp;the paste buffer that you copied into from your Excel table, contains Carriage Returns(hex 0D) and Linefeed(hex 0A) at the end of each cell that was copied.&amp;nbsp; Below is the Hex representation of the list of lots, taken from the pasted Excel file.&amp;nbsp; It is actually all one long line of hex characters, but for illustration, I have broken the line of hex characters at the end of each lot&lt;/P&gt;
&lt;PRE&gt;31383134383031382D30312D30300D0A
31383134383031382D30312D30310D0A
31383134383031382D30322D30300D0A
31383135383031312D30312D30300D0A
31383135383031312D30322D30300D0A
31383138383030322D30312D30300D0A
31383138383030322D30312D30320D0A
31383138383030322D30312D30330D0A
31383138383030342D30312D30300D0A
31383439383030372D30312D30300D0A
31383441383030352D30312D30300D0A&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thus,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;176 = 11 X (14 + 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a piece of code that will break the string into a list of strings&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fullText = teb &amp;lt;&amp;lt; get text;
fullTextList = {};
start = 1;
While( Substr( fullText, start, 14 ) != "",
	Insert Into( fullTextList, Substr( fullText, start, 14 ) );
	start = start + 16;
);
show( fullTextList );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jun 2018 10:12:26 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-06-12T10:12:26Z</dc:date>
    <item>
      <title>How do I make text box to a List for sql query</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60049#M32803</link>
      <description>&lt;P&gt;&lt;FONT color="#000000" size="2"&gt;I am trying to make a&amp;nbsp;text box&amp;nbsp;to allow users to input information for sql query, and users copy this information from excel to text box. my question:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000" size="2"&gt;1. This length of Lot is fixed&amp;nbsp;=14, and there are 11 lots in this example. Why the length of text box is 176?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#000000" size="2"&gt;2. How to&amp;nbsp; make this text into a list as {"18148018-01-00","18148018-01-01","18148018-02-00"......}&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;Names Default To Here( 1 );
//make a text box for user input
New Window( "Example",
 Outline Box( "Lot List Input",
  H List Box( Text Box( "=&amp;gt;" ), teb = Text Edit Box( "Please input your lots", &amp;lt;&amp;lt;Set Width( 200 ), &amp;lt;&amp;lt;set nLines( 20 ) ) )
 )
);

length(teb&amp;lt;&amp;lt;get text);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1.png" style="width: 511px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11094i718BA036A0FE5EC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 07:06:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60049#M32803</guid>
      <dc:creator>Benson</dc:creator>
      <dc:date>2018-06-12T07:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make text box to a List for sql query</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60059#M32804</link>
      <description>&lt;P&gt;The issue is, that&amp;nbsp;the paste buffer that you copied into from your Excel table, contains Carriage Returns(hex 0D) and Linefeed(hex 0A) at the end of each cell that was copied.&amp;nbsp; Below is the Hex representation of the list of lots, taken from the pasted Excel file.&amp;nbsp; It is actually all one long line of hex characters, but for illustration, I have broken the line of hex characters at the end of each lot&lt;/P&gt;
&lt;PRE&gt;31383134383031382D30312D30300D0A
31383134383031382D30312D30310D0A
31383134383031382D30322D30300D0A
31383135383031312D30312D30300D0A
31383135383031312D30322D30300D0A
31383138383030322D30312D30300D0A
31383138383030322D30312D30320D0A
31383138383030322D30312D30330D0A
31383138383030342D30312D30300D0A
31383439383030372D30312D30300D0A
31383441383030352D30312D30300D0A&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thus,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;176 = 11 X (14 + 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a piece of code that will break the string into a list of strings&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fullText = teb &amp;lt;&amp;lt; get text;
fullTextList = {};
start = 1;
While( Substr( fullText, start, 14 ) != "",
	Insert Into( fullTextList, Substr( fullText, start, 14 ) );
	start = start + 16;
);
show( fullTextList );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 10:12:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60059#M32804</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-06-12T10:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make text box to a List for sql query</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60061#M32806</link>
      <description>&lt;P&gt;Jim, Thanks for explantion. I&amp;nbsp; consider there will be 2 extra characters form excecl with copy/paste, and Now I could make a list :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 10:28:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60061#M32806</guid>
      <dc:creator>Benson</dc:creator>
      <dc:date>2018-06-12T10:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make text box to a List for sql query</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60075#M32813</link>
      <description>&lt;P&gt;Here's another way to parse the information using WORDS.&amp;nbsp; Followed by using CONCAT ITEMS to create an IN list.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;lot_text = 
"31383134383031382
31383134383031382
31383134383031382
31383135383031312
31383135383031312
31383138383030322
31383138383030322
31383138383030322
31383138383030342
31383439383030372
31383441383030352";
crlf = "
";
lot_list = words(lot_text, crlf);
lot_in_list = "('" || concat items(lot_list, "', '") || "')";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jun 2018 13:52:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60075#M32813</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-06-12T13:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I make text box to a List for sql query</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60219#M32842</link>
      <description>This is useful :D&lt;/img&gt;</description>
      <pubDate>Wed, 13 Jun 2018 03:31:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-make-text-box-to-a-List-for-sql-query/m-p/60219#M32842</guid>
      <dc:creator>Benson</dc:creator>
      <dc:date>2018-06-13T03:31:15Z</dc:date>
    </item>
  </channel>
</rss>

