<?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: Parse Outermost Quoted String in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434425#M68418</link>
    <description>&lt;P&gt;You probably need to look at expr() and insert into() or substitute into() for constructing you new table script. If you expand your scipt to show what you have we might be able to help you in more detail.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Nov 2021 08:49:17 GMT</pubDate>
    <dc:creator>pauldeen</dc:creator>
    <dc:date>2021-11-09T08:49:17Z</dc:date>
    <item>
      <title>Parse Outermost Quoted String</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434246#M68402</link>
      <description>&lt;P&gt;I am writing a script that makes an additional script on the data table as "New Script". But I am having a problem with parsing the string I have set up as the code to be placed in the new script.&lt;/P&gt;
&lt;P&gt;The problem is when I run "dt &amp;lt;&amp;lt; New Script("Script", parse(a));" when it parses the string, it assumes the quote prior to the Graph Builder is the first quote and then ends that quote at the beginning of the "Graph Title" section and ends.&amp;nbsp; I need to be able to write in the script that my script is writing to the data table, many quotes without them parsing when I go to place them in the script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code looks something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;a = "Parse(Eval(Eval Insert(
&amp;nbsp; &amp;nbsp; "Graph Builder(
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dispatch(
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;... ,"Graph Title",
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;....

&amp;nbsp; &amp;nbsp; )"
)));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:04:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434246#M68402</guid>
      <dc:creator>Martin</dc:creator>
      <dc:date>2023-06-09T18:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Parse Outermost Quoted String</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434425#M68418</link>
      <description>&lt;P&gt;You probably need to look at expr() and insert into() or substitute into() for constructing you new table script. If you expand your scipt to show what you have we might be able to help you in more detail.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 08:49:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434425#M68418</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2021-11-09T08:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Parse Outermost Quoted String</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434493#M68421</link>
      <description>&lt;P&gt;This is the exact script I need to put into a new table script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;Eval(
	Parse(
		eval Insert(
			"\[Graph Builder(
				Size( 1500, 400 ),
				Show Control Panel( 0 ),
				Show Title( 0 ),
				Variables(
					X( :TIME ),
					Y( :Y )
				),
				Elements( Points( X, ^TempY^, Legend( 6 ) ) ),
				SendToReport(
					Dispatch(
						{},
						"Graph Builder",
						OutlineBox,
						{Set Title( "My New Title" ),
						Image Export Display( Normal )}
					),
					Dispatch(
						{},
						"TIME",
						ScaleBox,
						{Format( "Format Pattern", "&amp;lt;M&amp;gt;&amp;lt;-&amp;gt;&amp;lt;D&amp;gt;&amp;lt;-&amp;gt;&amp;lt;YY&amp;gt; &amp;lt;zhh&amp;gt;&amp;lt;ampm&amp;gt;" ),
						Min( 3717386000 ), Max( 3717507800 ), Interval( "Hour" ), Inc( 4 ),
						Minor Ticks( 0 ), Label Row( Label Orientation( "Vertical" ) )}
					),
					Dispatch(
						{},
						"graph title",
						TextEditBox,
						{Set Text( "Graph Title" )}
					),
					Dispatch(
						{},
						"Y title",
						TextEditBox,
						{Set Text( "Thing of Interest" )}
					)
				)
			)]\"
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The reason for the "Eval(Parse(Eval Insert(" is because there is a variable in the script "TempY" that is the name of another table variable that gets changed via a radio box in an input window.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 15:05:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434493#M68421</guid>
      <dc:creator>Martin</dc:creator>
      <dc:date>2021-11-09T15:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Parse Outermost Quoted String</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434559#M68425</link>
      <description>&lt;P&gt;I agree that you should learn how to use expressions, but you also need to learn how to work with character strings. Use the \!" escape sequence to enter a double quotation mark inside a string. Otherwise, the quotation mark is interpreted as a string delimiter as you discovered.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 17:18:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/434559#M68425</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-11-09T17:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Parse Outermost Quoted String</title>
      <link>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/569536#M78014</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2501"&gt;@Martin&lt;/a&gt;.&lt;BR /&gt;This is an example with Big Class and Substitute&lt;BR /&gt;a) to get TempY replaced with the variable&lt;/P&gt;&lt;P&gt;b) to get the code into the NewScript function.&lt;BR /&gt;&lt;BR /&gt;The &lt;EM&gt;TempY&lt;/EM&gt; in "Elements" &lt;STRONG&gt;has&lt;/STRONG&gt; to be replaced by "Y", so you could put "Y" there directly.&lt;BR /&gt;Did you want to change "Y" in Variables?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
TempY=Expr(Y);
myCode= Substitute(Expr(
		
			Graph Builder(
				Size( 1500, 400 ),
				Show Control Panel( 0 ),
				Show Title( 0 ),
				Variables(
					X( :age ),
					Y( :height /*change this one*/ )
				),
				Elements( Points( X, TempY, Legend( 6 ) ) )

		)),
	Expr(TempY),Name Expr(TempY));
Eval(Substitute(Expr(dt &amp;lt;&amp;lt; New Script("Script", __script__)),Expr(__script__),Name Expr(myCode)))
	

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Nov 2022 17:38:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Parse-Outermost-Quoted-String/m-p/569536#M78014</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-11-15T17:38:23Z</dc:date>
    </item>
  </channel>
</rss>

