<?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 JSL: How to copy a formula from one data table to another? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9859#M9638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to copy a formula from one data table to another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only suggestion I found and managed to get to work is this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/thread/11125" target="_blank"&gt;Copy Columns With Formulas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;BR /&gt;&lt;P&gt;The easiest way is to get the script for the original data table.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;data table("Original") &amp;lt;&amp;lt; get script;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Now the script appears in the log.&amp;nbsp; Just copy and paste into a new script, keeping only the bits related to adding the the formula columns.&amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;which seems, however, very convoluted and time-consuming when I need to apply it multiple times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This other method was suggested here: &lt;A href="https://community.jmp.com/message/17675" target="_blank"&gt;Saving the prediction formula to an existing column?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14131254495845961" jivemacro_uid="_14131254495845961"&gt;&lt;BR /&gt;&lt;P&gt;f = column("prednew") &amp;lt;&amp;lt; Get Formula;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;column("predold") &amp;lt;&amp;lt; Set Formula( Name Expr( f ));&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I tried:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14131255502152481 jive_text_macro" jivemacro_uid="_14131255502152481"&gt;&lt;BR /&gt;&lt;P&gt;f = data table("table 1") &amp;lt;&amp;lt; column("my formula") &amp;lt;&amp;lt; Get Formula;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;data table("table 2") &amp;lt;&amp;lt; column("my formula") &amp;lt;&amp;lt; Set Formula( Name Expr( f ));&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;where 'my formula' already exists, but is empty, in table 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't work, and the log gives no errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Is this documented anywhere in JMP's official documentation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Oct 2016 13:14:26 GMT</pubDate>
    <dc:creator>jumper</dc:creator>
    <dc:date>2016-10-28T13:14:26Z</dc:date>
    <item>
      <title>JSL: How to copy a formula from one data table to another?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9859#M9638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to copy a formula from one data table to another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only suggestion I found and managed to get to work is this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/thread/11125" target="_blank"&gt;Copy Columns With Formulas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;BR /&gt;&lt;P&gt;The easiest way is to get the script for the original data table.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;data table("Original") &amp;lt;&amp;lt; get script;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Now the script appears in the log.&amp;nbsp; Just copy and paste into a new script, keeping only the bits related to adding the the formula columns.&amp;nbsp; &lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;which seems, however, very convoluted and time-consuming when I need to apply it multiple times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This other method was suggested here: &lt;A href="https://community.jmp.com/message/17675" target="_blank"&gt;Saving the prediction formula to an existing column?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14131254495845961" jivemacro_uid="_14131254495845961"&gt;&lt;BR /&gt;&lt;P&gt;f = column("prednew") &amp;lt;&amp;lt; Get Formula;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;column("predold") &amp;lt;&amp;lt; Set Formula( Name Expr( f ));&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I tried:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14131255502152481 jive_text_macro" jivemacro_uid="_14131255502152481"&gt;&lt;BR /&gt;&lt;P&gt;f = data table("table 1") &amp;lt;&amp;lt; column("my formula") &amp;lt;&amp;lt; Get Formula;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;data table("table 2") &amp;lt;&amp;lt; column("my formula") &amp;lt;&amp;lt; Set Formula( Name Expr( f ));&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;where 'my formula' already exists, but is empty, in table 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't work, and the log gives no errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Is this documented anywhere in JMP's official documentation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 13:14:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9859#M9638</guid>
      <dc:creator>jumper</dc:creator>
      <dc:date>2016-10-28T13:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to copy a formula from one data table to another?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9860#M9639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get Formula() and Set Formula() are documented, whereas your syntax is probably not. Column() cannot be used as a message to a data table. Use instead the first argument of Column() to specify the data table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;f &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Data Table&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"table 1"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"my formula"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Get Formula&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #032ce4;"&gt;Column&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;Data Table&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"table 2"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"my formula"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Set Formula&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;Name Expr&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; f &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Oct 2014 18:01:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9860#M9639</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-10-12T18:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to copy a formula from one data table to another?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9861#M9640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option is to use Get Column Properties() followed by Add Column Properties() to copy all properties, incl. formula. No need for Name Expr() when using this approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;oldcol &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Data Table&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"table 1"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"my formula"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;newcol &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Data Table&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"table 2"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"my formula"&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;newcol &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;Add Column Properties&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; oldcol &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;Get Column Properties&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Oct 2014 19:27:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9861#M9640</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-10-12T19:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to copy a formula from one data table to another?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9862#M9641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I couldn't get the method in your other post to work, but this works perfectly - thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 17:46:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/9862#M9641</guid>
      <dc:creator>jumper</dc:creator>
      <dc:date>2014-10-13T17:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: How to copy a formula from one data table to another?</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/45091#M25770</link>
      <description>&lt;P&gt;Coming a few years later to the party :)&lt;/img&gt;&lt;/P&gt;
&lt;P&gt;You might also want to consider the Formula Depot, a feature added to JMP Pro 13, that is designed to help this kind of scenario.&lt;/P&gt;
&lt;P&gt;It allows you to save (we call it "publish" in this case) a model (any formula, actually) to a central place from where it can be added to other tables - as well as converted to different languages for deployment, compared to other models, profiled, and so on.&lt;/P&gt;
&lt;P&gt;Check it out:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.jmp.com/support/help/13/Formula_Depot.shtml" target="_blank"&gt;http://www.jmp.com/support/help/13/Formula_Depot.shtml&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 21:23:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-How-to-copy-a-formula-from-one-data-table-to-another/m-p/45091#M25770</guid>
      <dc:creator>nascif_jmp</dc:creator>
      <dc:date>2017-09-25T21:23:53Z</dc:date>
    </item>
  </channel>
</rss>

