<?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: Continue Script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Continue-Script/m-p/238296#M47072</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/16445"&gt;@skyzvoir0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, so i have a main table (main_dt) which i am going to update (update_dt). However, there are times when update_dt is empty. How do i make it such that the script continues&amp;nbsp; to run? What function do i use for it to continue?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There are a number of ways to ensure that your script handles potential problems. Here are two ways that you might deal with your situation of a data table with no rows causing a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/throw-and-catch-exceptions.shtml#ww307385" target="_blank"&gt;Try()&lt;/A&gt; - The Try() function allows you to attempt something that might not work and recover gracefully. In your case you could surround your &amp;lt;&amp;lt; Update() with a Try(). This would allow your script to continue if the &amp;lt;&amp;lt; Update() message throws an error.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/if.shtml#ww246633" target="_blank"&gt;If()&lt;/A&gt; - The If() conditional allows you to test whether a condition is true before executing other statements. So, you can check whether update_dt is empty before doing the &amp;lt;&amp;lt;Update().&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;When you say that "update_dt is empty," it's not clear whether you mean that the data table doesn't have any rows or that the variable update_dt has no value. Which you mean makes a difference in how you would check for that condition in the If(). If you mean that the data table doesn't have any rows you can use the &lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/iterate-on-rows-in-a-table.shtml#ww877752" target="_self"&gt;N Rows()&lt;/A&gt; function. Alternatively, the &lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/specific-element-types.shtml" target="_blank"&gt;Is Empty()&lt;/A&gt; or &lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/missing-values.shtml#ww373292" target="_blank"&gt;Is Missing()&lt;/A&gt; functions will test whether a JSL variable doesn't have a value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Dec 2019 01:21:48 GMT</pubDate>
    <dc:creator>Jeff_Perkinson</dc:creator>
    <dc:date>2019-12-12T01:21:48Z</dc:date>
    <item>
      <title>Continue Script</title>
      <link>https://community.jmp.com/t5/Discussions/Continue-Script/m-p/238280#M47070</link>
      <description>&lt;P&gt;Hi, so i have a main table (main_dt) which i am going to update (update_dt). However, there are times when update_dt is empty. How do i make it such that the script continues&amp;nbsp; to run? What function do i use for it to continue?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 23:12:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Continue-Script/m-p/238280#M47070</guid>
      <dc:creator>skyzvoir0001</dc:creator>
      <dc:date>2019-12-11T23:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Continue Script</title>
      <link>https://community.jmp.com/t5/Discussions/Continue-Script/m-p/238296#M47072</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/16445"&gt;@skyzvoir0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi, so i have a main table (main_dt) which i am going to update (update_dt). However, there are times when update_dt is empty. How do i make it such that the script continues&amp;nbsp; to run? What function do i use for it to continue?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There are a number of ways to ensure that your script handles potential problems. Here are two ways that you might deal with your situation of a data table with no rows causing a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/throw-and-catch-exceptions.shtml#ww307385" target="_blank"&gt;Try()&lt;/A&gt; - The Try() function allows you to attempt something that might not work and recover gracefully. In your case you could surround your &amp;lt;&amp;lt; Update() with a Try(). This would allow your script to continue if the &amp;lt;&amp;lt; Update() message throws an error.&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/if.shtml#ww246633" target="_blank"&gt;If()&lt;/A&gt; - The If() conditional allows you to test whether a condition is true before executing other statements. So, you can check whether update_dt is empty before doing the &amp;lt;&amp;lt;Update().&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;SPAN&gt;When you say that "update_dt is empty," it's not clear whether you mean that the data table doesn't have any rows or that the variable update_dt has no value. Which you mean makes a difference in how you would check for that condition in the If(). If you mean that the data table doesn't have any rows you can use the &lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/iterate-on-rows-in-a-table.shtml#ww877752" target="_self"&gt;N Rows()&lt;/A&gt; function. Alternatively, the &lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/specific-element-types.shtml" target="_blank"&gt;Is Empty()&lt;/A&gt; or &lt;A href="https://www.jmp.com/support/help/en/15.0/#page/jmp/missing-values.shtml#ww373292" target="_blank"&gt;Is Missing()&lt;/A&gt; functions will test whether a JSL variable doesn't have a value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2019 01:21:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Continue-Script/m-p/238296#M47072</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2019-12-12T01:21:48Z</dc:date>
    </item>
  </channel>
</rss>

