<?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: Saved Log vs. Viewed Log Contain Different Content in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Saved-Log-vs-Viewed-Log-Contain-Different-Content/m-p/394469#M64483</link>
    <description>Thank you! That solved my immediate problem and taught me some new basics that will help a lot in the future!</description>
    <pubDate>Fri, 18 Jun 2021 13:52:09 GMT</pubDate>
    <dc:creator>amurphy</dc:creator>
    <dc:date>2021-06-18T13:52:09Z</dc:date>
    <item>
      <title>Saved Log vs. Viewed Log Contain Different Content</title>
      <link>https://community.jmp.com/t5/Discussions/Saved-Log-vs-Viewed-Log-Contain-Different-Content/m-p/393520#M64386</link>
      <description>&lt;P&gt;I have a table that I've manually edited extensively and am looking to save the script for so I can automate in the future. I've written the following script (intended to be pasted into data table or allow user to run independently), which works, but I have to copy &amp;amp; paste into a text file to save:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

If( Is Empty ( dt ),
	Try( dt = Open(), Throw("No data table found"))
	);

Open Log();

dt &amp;lt;&amp;lt; Get Script;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I add the line Save Log (" "); it correctly saved the log, but only up to the transcript of the executed script and no longer contains the output of dt &amp;lt;&amp;lt; Get Script;. I've tried many iterations of reordering the commands, but can't get the saved log to match the viewed log:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

If( Is Empty ( dt ),
	Try( dt = Open(), Throw("No data table found"))
	);

Open Log();

dt &amp;lt;&amp;lt; Get Script;

Save Log("");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:49:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saved-Log-vs-Viewed-Log-Contain-Different-Content/m-p/393520#M64386</guid>
      <dc:creator>amurphy</dc:creator>
      <dc:date>2023-06-09T19:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Saved Log vs. Viewed Log Contain Different Content</title>
      <link>https://community.jmp.com/t5/Discussions/Saved-Log-vs-Viewed-Log-Contain-Different-Content/m-p/393530#M64387</link>
      <description>&lt;LI-CODE lang="jsl"&gt;dt &amp;lt;&amp;lt; Get Script;&lt;/LI-CODE&gt;&lt;P&gt;gets the script, but doesn't do anything with it. Try&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;write(dt &amp;lt;&amp;lt; Get Script);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;JMP's behavior when evaluating an expression (even an expression with a bunch of semicolon separated statements) is to print the last result. So, when your submitted script ends with dt&amp;lt;&amp;lt;GetScript, that's what winds up in the log. Otherwise, the &amp;lt;&amp;lt;GetScript method is evaluated, the value is returned, then as soon as another statement executes, the value is thrown away in favor of the next statement's result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may need a newline in the write, something like write("\!n", dt&amp;lt;&amp;lt;GetScript). The write function adds nothing to the value that is printed, unlike the print() and show() functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 00:19:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saved-Log-vs-Viewed-Log-Contain-Different-Content/m-p/393530#M64387</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-06-16T00:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Saved Log vs. Viewed Log Contain Different Content</title>
      <link>https://community.jmp.com/t5/Discussions/Saved-Log-vs-Viewed-Log-Contain-Different-Content/m-p/394469#M64483</link>
      <description>Thank you! That solved my immediate problem and taught me some new basics that will help a lot in the future!</description>
      <pubDate>Fri, 18 Jun 2021 13:52:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Saved-Log-vs-Viewed-Log-Contain-Different-Content/m-p/394469#M64483</guid>
      <dc:creator>amurphy</dc:creator>
      <dc:date>2021-06-18T13:52:09Z</dc:date>
    </item>
  </channel>
</rss>

