<?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: Delete a script from a datatable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/42827#M24833</link>
    <description>&lt;P&gt;Unfortunately these objects were originally known as table properties and now we call them table scripts. The message protocol to the data table is a bit confusing as a result.&lt;/P&gt;
&lt;P&gt;See &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Scripting Index&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Objects&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Data Table&lt;/STRONG&gt;. Select &lt;STRONG&gt;Delete Table Property&lt;/STRONG&gt; in the second list for more information. This message is the one that you are looking for.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2017 14:29:51 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2017-08-03T14:29:51Z</dc:date>
    <item>
      <title>Delete a script from a datatable</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/42823#M24829</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently writing a script that pulls data from a DB.&amp;nbsp; I add several scripts to the datatable (not in a column, but in the script box, frame top left of the datatable).&lt;/P&gt;&lt;P&gt;JMP adds standard some of the scripts.&amp;nbsp; One of them is 'Save To DB'.&amp;nbsp; This script needs to get deleted in the script I'm writing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't have the users run this script accidently.&amp;nbsp; In the past we did 1 DB-update and it completely destroyed the structure of our DB (meaning other programs that connect to th DB stopped working).&amp;nbsp; Therefore leaving it in is actually a big production risk (and it will happen frequently).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can add scripts with&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; New Script( ... );&lt;/P&gt;&lt;P&gt;however,&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Delete Script( 'MyScript' );&lt;/P&gt;&lt;P&gt;doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me with this please?&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 14:19:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/42823#M24829</guid>
      <dc:creator>jan_solo</dc:creator>
      <dc:date>2017-08-03T14:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a script from a datatable</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/42827#M24833</link>
      <description>&lt;P&gt;Unfortunately these objects were originally known as table properties and now we call them table scripts. The message protocol to the data table is a bit confusing as a result.&lt;/P&gt;
&lt;P&gt;See &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Scripting Index&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Objects&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Data Table&lt;/STRONG&gt;. Select &lt;STRONG&gt;Delete Table Property&lt;/STRONG&gt; in the second list for more information. This message is the one that you are looking for.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 14:29:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/42827#M24833</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-08-03T14:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a script from a datatable</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/42828#M24834</link>
      <description>&lt;P&gt;Here's some code that deletes two table variables and one property:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;current_dataset &amp;lt;&amp;lt; Delete Table Variable("JSL");
current_dataset &amp;lt;&amp;lt; Delete Table Variable("SQL");
current_dataset &amp;lt;&amp;lt; Delete Table Property("Source");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In addition you can hide the ODBC connection string with a preference. &amp;nbsp;In JSL you can do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pref(ODBC Hide Connection String(1));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Aug 2017 14:50:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/42828#M24834</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2017-08-03T14:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Delete a script from a datatable</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/246332#M48381</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is late... but just for reference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//To get all the names of the scripts in a data table
lstScripts = dt &amp;lt;&amp;lt; Get Table Script Names;

//delete scripts in data table
dt &amp;lt;&amp;lt; Delete Scripts(lstScripts);&amp;nbsp; // delete all scripts
dt &amp;lt;&amp;lt; Delete Scripts({"Script1", "Script2"});&amp;nbsp; &amp;nbsp;// delete certain scripts only&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Feb 2020 02:52:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-a-script-from-a-datatable/m-p/246332#M48381</guid>
      <dc:creator>KalaiAce21</dc:creator>
      <dc:date>2020-02-07T02:52:48Z</dc:date>
    </item>
  </channel>
</rss>

