<?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 If select where does not find value then do x else continue with rest of script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/If-select-where-does-not-find-value-then-do-x-else-continue-with/m-p/356564#M60650</link>
    <description>&lt;P&gt;Hello and Happy Friday,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find a way around this one. I have a part in my script where it uses the following below. The issue I have is when it does not find the value ABC in Column1. Basically, I want it to where it runs the code below but if it does not find ABC, then I want it to save a blank table (csv) and stop running the rest of the code. If it does find ABC , then I want it to continue with the rest of the code. Any help will be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Line 1: dt &amp;lt;&amp;lt; select where( :Column1 =="ABC" ););
Line 2: dt2=dt &amp;lt;&amp;lt; Subset( Output Table( "ABC" ), Selected Rows( 1 ) ););&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 22:05:22 GMT</pubDate>
    <dc:creator>Josee</dc:creator>
    <dc:date>2023-06-09T22:05:22Z</dc:date>
    <item>
      <title>If select where does not find value then do x else continue with rest of script</title>
      <link>https://community.jmp.com/t5/Discussions/If-select-where-does-not-find-value-then-do-x-else-continue-with/m-p/356564#M60650</link>
      <description>&lt;P&gt;Hello and Happy Friday,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find a way around this one. I have a part in my script where it uses the following below. The issue I have is when it does not find the value ABC in Column1. Basically, I want it to where it runs the code below but if it does not find ABC, then I want it to save a blank table (csv) and stop running the rest of the code. If it does find ABC , then I want it to continue with the rest of the code. Any help will be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Line 1: dt &amp;lt;&amp;lt; select where( :Column1 =="ABC" ););
Line 2: dt2=dt &amp;lt;&amp;lt; Subset( Output Table( "ABC" ), Selected Rows( 1 ) ););&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:05:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-select-where-does-not-find-value-then-do-x-else-continue-with/m-p/356564#M60650</guid>
      <dc:creator>Josee</dc:creator>
      <dc:date>2023-06-09T22:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: If select where does not find value then do x else continue with rest of script</title>
      <link>https://community.jmp.com/t5/Discussions/If-select-where-does-not-find-value-then-do-x-else-continue-with/m-p/356571#M60651</link>
      <description>&lt;P&gt;Here is a simple example script that should do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select where( :Column1 =="ABC" );
If( nrows(dt &amp;lt;&amp;lt; get selected rows) == 0,
	dtx = new table("no rows");
	dtx &amp;lt;&amp;lt; save("...........csv");
	stop();
);

dt2=dt &amp;lt;&amp;lt; Subset( Output Table( "ABC" ), Selected Rows( 1 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Feb 2021 20:39:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-select-where-does-not-find-value-then-do-x-else-continue-with/m-p/356571#M60651</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-02-05T20:39:29Z</dc:date>
    </item>
  </channel>
</rss>

