<?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 How to determine a column has formula? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-determine-a-column-has-formula/m-p/579015#M78639</link>
    <description>&lt;P&gt;I would like to remove all formulas from all columns with script. I wrote a forloop but whether a column has formula needs to be determined. How to do that with scripts?&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:57:59 GMT</pubDate>
    <dc:creator>DivisiveEagle45</dc:creator>
    <dc:date>2023-06-10T23:57:59Z</dc:date>
    <item>
      <title>How to determine a column has formula?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-determine-a-column-has-formula/m-p/579015#M78639</link>
      <description>&lt;P&gt;I would like to remove all formulas from all columns with script. I wrote a forloop but whether a column has formula needs to be determined. How to do that with scripts?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:57:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-determine-a-column-has-formula/m-p/579015#M78639</guid>
      <dc:creator>DivisiveEagle45</dc:creator>
      <dc:date>2023-06-10T23:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine a column has formula?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-determine-a-column-has-formula/m-p/579023#M78640</link>
      <description>&lt;P&gt;One option is to use &amp;lt;&amp;lt;Get Formula with Is Empty()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
col1 = dt &amp;lt;&amp;lt; New Column("Ratio", Numeric, Continuous);
col1 &amp;lt;&amp;lt; Formula(:height / :weight);
wait(1);

For Each({col_name}, dt &amp;lt;&amp;lt; Get Column Names("String"),
	col = Column(dt, col_name);
	If(!Is Empty(col &amp;lt;&amp;lt; get formula),
		Column(dt, col_name) &amp;lt;&amp;lt; Delete Formula
	);
);

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Scripting Index has a lot of information and you can find it directly from JMP's menu Help / Scripting Index&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1670526823473.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48061i42419665F6F600E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1670526823473.png" alt="jthi_0-1670526823473.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you add those formulas yourself and don't really need them for formula usage, you can avoid adding them all together by using &amp;lt;&amp;lt; Set Each Value()&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 19:14:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-determine-a-column-has-formula/m-p/579023#M78640</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-12-08T19:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine a column has formula?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-determine-a-column-has-formula/m-p/672784#M86046</link>
      <description>&lt;P&gt;It worked!&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 23:06:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-determine-a-column-has-formula/m-p/672784#M86046</guid>
      <dc:creator>DivisiveEagle45</dc:creator>
      <dc:date>2023-08-30T23:06:22Z</dc:date>
    </item>
  </channel>
</rss>

