<?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: JSL to select Yes on a prompt in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/632862#M83124</link>
    <description>&lt;P&gt;At least for me the message is written to the log but the script does continue.&amp;nbsp; I am sure there is a more elegant solution to clean up your log, but the middle four lines here is a 'brute force' approach:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
log entry = Log Capture(:Height &amp;lt;&amp;lt; Range Check( LE LE( 48, 62) ));
if(
	is missing(regex(log entry, "^(\!NOut of range.*Continue\!\?\!N$)|()")),
	throw("Unexpected problem in range check:\!N" || char( log entry ) )
);
check = :Height &amp;lt;&amp;lt; Get Range Check;
Show( check );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To simulate an error (I don't know what might cause Range Check() to fail) you can replace the log entry line with this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;log entry = Log Capture( 1/"a" ) ;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 16:51:29 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2023-05-18T16:51:29Z</dc:date>
    <item>
      <title>JSL to select Yes on a prompt</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/629051#M82727</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am on JMP 16.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a set of data with a range check attached to it with data that is outside of the range that we will always exclude.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Correcting the LIMS entry is not an option unfortunately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If possible, how would one script it to always select Yes on the resulting prompt below for the range check?&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="ralphtedesco_0-1683295716957.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52588i7FA183E12BF74285/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ralphtedesco_0-1683295716957.png" alt="ralphtedesco_0-1683295716957.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any help, every day you learn something new about this program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:09:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/629051#M82727</guid>
      <dc:creator>ralphtedesco</dc:creator>
      <dc:date>2023-06-09T16:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to select Yes on a prompt</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/632000#M83036</link>
      <description>&lt;P&gt;this is an example from the scripting index&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 = Open( "$SAMPLE_DATA/Big Class.jmp" );
:Height &amp;lt;&amp;lt; Range Check( LE LE( 48, 65) );
check = :Height &amp;lt;&amp;lt; Get Range Check;
Show( check );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The values outside the range are set to missing, and there is no dialog.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 19:14:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/632000#M83036</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2023-05-15T19:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to select Yes on a prompt</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/632186#M83060</link>
      <description>&lt;P&gt;Hello Byron,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking into it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Big Class source does not have any data outside of those ranges and wouldn't prompt the box. I tried following that prior to this and couldn't get it to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are only 40 data points in that set and if you tighten the range check to exclude points then the prompt appears in the log of the Scripting Index.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I understanding it correctly?&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 11:24:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/632186#M83060</guid>
      <dc:creator>ralphtedesco</dc:creator>
      <dc:date>2023-05-16T11:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to select Yes on a prompt</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/632862#M83124</link>
      <description>&lt;P&gt;At least for me the message is written to the log but the script does continue.&amp;nbsp; I am sure there is a more elegant solution to clean up your log, but the middle four lines here is a 'brute force' approach:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
log entry = Log Capture(:Height &amp;lt;&amp;lt; Range Check( LE LE( 48, 62) ));
if(
	is missing(regex(log entry, "^(\!NOut of range.*Continue\!\?\!N$)|()")),
	throw("Unexpected problem in range check:\!N" || char( log entry ) )
);
check = :Height &amp;lt;&amp;lt; Get Range Check;
Show( check );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To simulate an error (I don't know what might cause Range Check() to fail) you can replace the log entry line with this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;log entry = Log Capture( 1/"a" ) ;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 16:51:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/632862#M83124</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2023-05-18T16:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to select Yes on a prompt</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/633153#M83159</link>
      <description>&lt;P&gt;Hello ih,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am guessing part of the problem I am having is that I am trying to script it into a JSL Quote into a clickable button to pull the data from the LIMS. If I run your script outright then it works exactly as you described. But if I put it into a button then it stops working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically it gives the throw response of "Unexpected problem in range check:"&amp;nbsp;but there is no information after the colon to tell me what it is getting stuck trying to do in the range check. If I substitute the log entry line like you said then it does give me something to work with "Cannot convert argument to a number [or matrix] in access or evaluation of 'Divide' , 1 / /*###*/"a" /*###*/" When in the button it is also giving the same dialog box as I had described in the original post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It sounds as though this just might be more of an effort than it is worth to try and script away.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JSL is the first language I am learning so there is still so so much to learn about it. Something tells me this is something small and fundamental that I do not understand yet.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 12:24:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/633153#M83159</guid>
      <dc:creator>ralphtedesco</dc:creator>
      <dc:date>2023-05-19T12:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to select Yes on a prompt</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/634366#M83231</link>
      <description>&lt;P&gt;I see what you mean, and I am not sure how to suppress that warning message.&amp;nbsp; For this use case though I would just skip the Range Check function and do this instead:&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 = Open( "$SAMPLE_DATA/Big Class.jmp" );

For each row( dt, 
	if(:Height &amp;lt; 53, :Height = Empty());
	if(:Height &amp;gt; 65, :Height = Empty());
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 May 2023 14:00:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/634366#M83231</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2023-05-23T14:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to select Yes on a prompt</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/634439#M83236</link>
      <description>&lt;P&gt;Thanks ih!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried it and that does exactly what I am looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help, this has quite a few applications so far and I am wondering where else I can apply this logic.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 15:43:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-select-Yes-on-a-prompt/m-p/634439#M83236</guid>
      <dc:creator>ralphtedesco</dc:creator>
      <dc:date>2023-05-23T15:43:08Z</dc:date>
    </item>
  </channel>
</rss>

