<?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: Add script stored in variable to data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-script-stored-in-variable-to-data-table/m-p/845940#M102059</link>
    <description>&lt;P&gt;Here is one option (evaluate it with while utilizing name expr)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");

dt1_script = dt1 &amp;lt;&amp;lt; Get Script;


Eval(EvalExpr(
	dt2 &amp;lt;&amp;lt; New Script("Create dt1", Expr(Name Expr(dt1_script)))
));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Mar 2025 20:38:34 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-03-04T20:38:34Z</dc:date>
    <item>
      <title>Add script stored in variable to data table</title>
      <link>https://community.jmp.com/t5/Discussions/Add-script-stored-in-variable-to-data-table/m-p/845930#M102058</link>
      <description>&lt;P&gt;How can I add a script to create a data table to another data table?&amp;nbsp; I have tried different combinations of &lt;STRONG&gt;Get Script&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;New Script&lt;/STRONG&gt;, and &lt;STRONG&gt;Eval&lt;/STRONG&gt; without success.&amp;nbsp; I am using JMP 18.1.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Example
dt_1; // Starting table 1.
dt_2; // Starting table 2.

dt_2_script = dt_2 &amp;lt;&amp;lt; Get Script;

// None of these work:
dt_1 &amp;lt;&amp;lt; New Script( "dt_2 Script", dt_2_script );
dt_1 &amp;lt;&amp;lt; New Script( "dt_2 Script", Eval( dt_2_script ) );
dt_1 &amp;lt;&amp;lt; New Script( "dt_2 Script", dt_2 &amp;lt;&amp;lt; Get Script );
dt_1 &amp;lt;&amp;lt; New Script( "dt_2 Script", Eval( dt_2 &amp;lt;&amp;lt; Get Script ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Mar 2025 20:20:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-script-stored-in-variable-to-data-table/m-p/845930#M102058</guid>
      <dc:creator>robot</dc:creator>
      <dc:date>2025-03-04T20:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add script stored in variable to data table</title>
      <link>https://community.jmp.com/t5/Discussions/Add-script-stored-in-variable-to-data-table/m-p/845940#M102059</link>
      <description>&lt;P&gt;Here is one option (evaluate it with while utilizing name expr)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");

dt1_script = dt1 &amp;lt;&amp;lt; Get Script;


Eval(EvalExpr(
	dt2 &amp;lt;&amp;lt; New Script("Create dt1", Expr(Name Expr(dt1_script)))
));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Mar 2025 20:38:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-script-stored-in-variable-to-data-table/m-p/845940#M102059</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-04T20:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add script stored in variable to data table</title>
      <link>https://community.jmp.com/t5/Discussions/Add-script-stored-in-variable-to-data-table/m-p/845942#M102061</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval( Eval Expr( dt_1 &amp;lt;&amp;lt; new script( "dt_2 Script", Expr( dt_2_script = dt_2 &amp;lt;&amp;lt; Get Script ) ) ) )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Mar 2025 20:50:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-script-stored-in-variable-to-data-table/m-p/845942#M102061</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-03-04T20:50:45Z</dc:date>
    </item>
  </channel>
</rss>

