<?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: Insert user input into a basic calculation in jsl in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Insert-user-input-into-a-basic-calculation-in-jsl/m-p/510699#M73859</link>
    <description>&lt;P&gt;Because the window is closed after pressing OK you will loose the reference to Number Edit Box. Because you are using &amp;lt;&amp;lt; Return Result you can use this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;time = nw["nom"];&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 Jun 2022 13:14:23 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-06-17T13:14:23Z</dc:date>
    <item>
      <title>Insert user input into a basic calculation in jsl</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-user-input-into-a-basic-calculation-in-jsl/m-p/510697#M73857</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I want to ask user to insert number of months for analysis. This value will be used in equation to select the last "insert months" of rows and then subset.&lt;/P&gt;&lt;P&gt;I prepared following part at the beginning, but this leads to an error.&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 );
nw = New Window("", &amp;lt;&amp;lt;Modal, &amp;lt;&amp;lt;Return Result,
	HListBox(
		Panel Box("How many months would you like to analyze?",
			Lineup Box(
				2,
				nom  = Number Edit Box( 0 , &amp;lt;&amp;lt;Set Increment(1), &amp;lt;&amp;lt;Set Show Spin Box(1)),
			)
		)
));
time = nom &amp;lt;&amp;lt; get;

dt1 = Open( "file link" );

// Select last 180 days in Seconds and Subset
dt1 &amp;lt;&amp;lt; Select Where(Contains(:Run Type, "Prod") &amp;amp; :Date Time &amp;gt;= (:Date Time[N Rows (Current Data Table())]-(60*60*24*30*time)));
dt1 &amp;lt;&amp;lt; Subset( Output Table( "Subset of file" ), Selected Rows(1), Selected columns only( 0 ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and the error is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error jmp.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43374i9040A2AAD28ED563/image-size/medium?v=v2&amp;amp;px=400" role="button" title="error jmp.png" alt="error jmp.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Already thanks for you help..&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:01:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-user-input-into-a-basic-calculation-in-jsl/m-p/510697#M73857</guid>
      <dc:creator>Metin_Tueluemen</dc:creator>
      <dc:date>2023-06-09T17:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Insert user input into a basic calculation in jsl</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-user-input-into-a-basic-calculation-in-jsl/m-p/510699#M73859</link>
      <description>&lt;P&gt;Because the window is closed after pressing OK you will loose the reference to Number Edit Box. Because you are using &amp;lt;&amp;lt; Return Result you can use this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;time = nw["nom"];&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:14:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-user-input-into-a-basic-calculation-in-jsl/m-p/510699#M73859</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-17T13:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Insert user input into a basic calculation in jsl</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-user-input-into-a-basic-calculation-in-jsl/m-p/510701#M73860</link>
      <description>&lt;P&gt;Thank you very much. Worked perfectly :D&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:18:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-user-input-into-a-basic-calculation-in-jsl/m-p/510701#M73860</guid>
      <dc:creator>Metin_Tueluemen</dc:creator>
      <dc:date>2022-06-17T13:18:34Z</dc:date>
    </item>
  </channel>
</rss>

