<?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: Run functions when column is not empty in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Run-functions-when-column-is-not-empty/m-p/588227#M79324</link>
    <description>&lt;P&gt;You could use &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml?os=win&amp;amp;source=application#ww2752613" target="_self"&gt;Col N Missing&lt;/A&gt; in combination with &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/row-functions-2.shtml?os=win&amp;amp;source=application#ww2736864" target="_self"&gt;N Rows&lt;/A&gt; or &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml?os=win&amp;amp;source=application#ww4579582" target="_self"&gt;Col Number&lt;/A&gt; to check if there are anything else besides missing values. Below are some ideas:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(3),
	New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([., ., .])),
	New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([1, ., 3]))
);

Show(Col N Missing(:Column 1));
Show(Col N Missing(:Column 2));
If(N Rows(dt) - Col N Missing(:Column 1) &amp;gt; 0,
	Show(:Column 1 &amp;lt;&amp;lt; get values);
);

Show(Col Number(:Column 1));
Show(Col Number(:Column 2));
If(Col Number(:Column 2) &amp;gt;= 0,
	Show(:Column 2 &amp;lt;&amp;lt; get values);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Jan 2023 08:03:11 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-01-10T08:03:11Z</dc:date>
    <item>
      <title>Run functions when column is not empty</title>
      <link>https://community.jmp.com/t5/Discussions/Run-functions-when-column-is-not-empty/m-p/588210#M79323</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a function where I needed it running when and only the column is not blank. How can I properly check if the column is not blank and run the function, I tried isMissing() but is not working properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample function:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;exsqr = Function( {x}, x * x );
exsqr( 5 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it would look like something like this:&lt;/P&gt;&lt;P&gt;exsqr0; //function1&lt;/P&gt;&lt;P&gt;if (isMissing(Column1),&amp;nbsp; //if Column1 has values, it should run the function, else, skip this function and proceed to function3&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;exsqr); //function2&lt;/P&gt;&lt;P&gt;exsqr1; //function3&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:44:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Run-functions-when-column-is-not-empty/m-p/588210#M79323</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-06-08T16:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run functions when column is not empty</title>
      <link>https://community.jmp.com/t5/Discussions/Run-functions-when-column-is-not-empty/m-p/588227#M79324</link>
      <description>&lt;P&gt;You could use &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml?os=win&amp;amp;source=application#ww2752613" target="_self"&gt;Col N Missing&lt;/A&gt; in combination with &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/row-functions-2.shtml?os=win&amp;amp;source=application#ww2736864" target="_self"&gt;N Rows&lt;/A&gt; or &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml?os=win&amp;amp;source=application#ww4579582" target="_self"&gt;Col Number&lt;/A&gt; to check if there are anything else besides missing values. Below are some ideas:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(3),
	New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([., ., .])),
	New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([1, ., 3]))
);

Show(Col N Missing(:Column 1));
Show(Col N Missing(:Column 2));
If(N Rows(dt) - Col N Missing(:Column 1) &amp;gt; 0,
	Show(:Column 1 &amp;lt;&amp;lt; get values);
);

Show(Col Number(:Column 1));
Show(Col Number(:Column 2));
If(Col Number(:Column 2) &amp;gt;= 0,
	Show(:Column 2 &amp;lt;&amp;lt; get values);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2023 08:03:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Run-functions-when-column-is-not-empty/m-p/588227#M79324</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-01-10T08:03:11Z</dc:date>
    </item>
  </channel>
</rss>

