<?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: How to update table script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-update-table-script/m-p/442641#M69094</link>
    <description>&lt;P&gt;&amp;nbsp;In addition to &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;'s suggestion, you may want to rename the old "Script" to "Script_CurrentTime" instead of deleting it, then you can save the new script to "Script" without conflicts. This will create (old script) files you may not want to have captured, however, this would allow to track possible changes if required.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Dec 2021 13:15:54 GMT</pubDate>
    <dc:creator>martindemel</dc:creator>
    <dc:date>2021-12-06T13:15:54Z</dc:date>
    <item>
      <title>How to update table script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-table-script/m-p/442302#M69061</link>
      <description>&lt;P&gt;What is the most reliable way of updating table script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say I have a script that saves a snippet of a script into a table as table script and gives it a name "Script". Let's say, I run that script again and it again saves an updated snippet as table script - it will add " 2" to "Script" since that name already exists.&lt;/P&gt;&lt;P&gt;If I then want to run the script by name it will run the old one, with name "Script", when I really wanted to run the most recent, "Script 2".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And since I run the main script many times, it creates many versions of the "Script", when I just really want to keep updating it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far the most reliable option is to try to delete script with that name first before updating it:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;try(dt &amp;lt;&amp;lt; Delete Scripts( "Script" ));

dt &amp;lt;&amp;lt; New Table Script( "Script", Show("Test"));

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, Is there a way to get a pointer to table script and use it?&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;script = dt &amp;lt;&amp;lt; Get Table Script("Script");
script &amp;lt;&amp;lt; Run Script();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or even get a pointer to the script when creating it (I checked, looks like it doesn't work, New Script message doesn't return anything)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;script = dt &amp;lt;&amp;lt; New Script("Script", Show("Test"));
script &amp;lt;&amp;lt; Run Script();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:41:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-table-script/m-p/442302#M69061</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2023-06-10T23:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to update table script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-table-script/m-p/442428#M69067</link>
      <description>&lt;P&gt;Your suggestion to delete the script before recreating it, is the only method I am aware of to replace the script;&lt;/P&gt;
&lt;P&gt;To move the script into a variable and then run the script, all&amp;nbsp; you have to do is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;script = dt &amp;lt;&amp;lt; Get Table Script("Script");
script;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Dec 2021 21:43:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-table-script/m-p/442428#M69067</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-12-03T21:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to update table script</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-table-script/m-p/442641#M69094</link>
      <description>&lt;P&gt;&amp;nbsp;In addition to &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;'s suggestion, you may want to rename the old "Script" to "Script_CurrentTime" instead of deleting it, then you can save the new script to "Script" without conflicts. This will create (old script) files you may not want to have captured, however, this would allow to track possible changes if required.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 13:15:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-table-script/m-p/442641#M69094</guid>
      <dc:creator>martindemel</dc:creator>
      <dc:date>2021-12-06T13:15:54Z</dc:date>
    </item>
  </channel>
</rss>

