<?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 Insert contents of Parse expression rather than variable name into New Script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Insert-contents-of-Parse-expression-rather-than-variable-name/m-p/849125#M102502</link>
    <description>&lt;P&gt;I am looking to extend&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;excellent answer from&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Insert-contents-of-variable-expression-rather-than-variable-name/m-p/607415#M80897" target="_self"&gt;Insert contents of variable/expression rather than variable name into New Script&lt;/A&gt;&amp;nbsp;by combining script, but have not worked out the syntax.&amp;nbsp; Any ideas to get this to work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am using JMP 18.1.2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = New Table( "My Table" );

e1 = Expr(
	Print( "Run some code." )
);

e2 = Expr(
	Print( "Run some other code." )
);

e3 = Expr(
	Parse( Eval Insert( "\[
	^e1^;
	^e2^;
]\" ) )
);

// These work.
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "Test 1", Expr( Name Expr( e1 ) ) ) ) );
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "Test 2", Expr( Name Expr( e2 ) ) ) ) );

// This does not work.
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "Test 3", Expr( Name Expr( e3 ) ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 21 Mar 2025 18:20:58 GMT</pubDate>
    <dc:creator>robot</dc:creator>
    <dc:date>2025-03-21T18:20:58Z</dc:date>
    <item>
      <title>Insert contents of Parse expression rather than variable name into New Script</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-contents-of-Parse-expression-rather-than-variable-name/m-p/849125#M102502</link>
      <description>&lt;P&gt;I am looking to extend&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;excellent answer from&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Insert-contents-of-variable-expression-rather-than-variable-name/m-p/607415#M80897" target="_self"&gt;Insert contents of variable/expression rather than variable name into New Script&lt;/A&gt;&amp;nbsp;by combining script, but have not worked out the syntax.&amp;nbsp; Any ideas to get this to work?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I am using JMP 18.1.2&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = New Table( "My Table" );

e1 = Expr(
	Print( "Run some code." )
);

e2 = Expr(
	Print( "Run some other code." )
);

e3 = Expr(
	Parse( Eval Insert( "\[
	^e1^;
	^e2^;
]\" ) )
);

// These work.
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "Test 1", Expr( Name Expr( e1 ) ) ) ) );
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "Test 2", Expr( Name Expr( e2 ) ) ) ) );

// This does not work.
Eval( Eval Expr( dt &amp;lt;&amp;lt; New Script( "Test 3", Expr( Name Expr( e3 ) ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Mar 2025 18:20:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-contents-of-Parse-expression-rather-than-variable-name/m-p/849125#M102502</guid>
      <dc:creator>robot</dc:creator>
      <dc:date>2025-03-21T18:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Insert contents of Parse expression rather than variable name into New Script</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-contents-of-Parse-expression-rather-than-variable-name/m-p/849139#M102506</link>
      <description>&lt;P&gt;Print your e3 to see what it contains&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Name Expr(e3) = Parse(Eval Insert("
	^e1^;
	^e2^;
"));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This possibly does what you are looking for&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("My Table");

e1 = Expr(Print("Run some code."));

e2 = Expr(
	Print("Run some other code.")
);

e3 = Parse(Eval Insert("\[
	^Name Expr(e1)^;
	^Name Expr(e2)^;
]\"));

Eval(Eval Expr(dt &amp;lt;&amp;lt; New Script("Test 3", Expr(Name Expr(e3)))));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would generally avoid using Parse as it is a nightmare to debug&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("My Table");

e1 = Expr(Print("Run some code."));

e2 = Expr(
	Print("Run some other code.")
);

e3 = EvalExpr(
	Expr(Name Expr(e1));
	Expr(Name Expr(e2));
);

Eval(Eval Expr(dt &amp;lt;&amp;lt; New Script("Test 3", Expr(Name Expr(e3)))));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 18:38:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-contents-of-Parse-expression-rather-than-variable-name/m-p/849139#M102506</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-21T18:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Insert contents of Parse expression rather than variable name into New Script</title>
      <link>https://community.jmp.com/t5/Discussions/Insert-contents-of-Parse-expression-rather-than-variable-name/m-p/849140#M102507</link>
      <description>&lt;P&gt;Excellent!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 18:41:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Insert-contents-of-Parse-expression-rather-than-variable-name/m-p/849140#M102507</guid>
      <dc:creator>robot</dc:creator>
      <dc:date>2025-03-21T18:41:48Z</dc:date>
    </item>
  </channel>
</rss>

