<?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: Automate copying table scripts when rerunning &amp;quot;source&amp;quot; in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783737#M96837</link>
    <description>&lt;P&gt;Here is other option&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
&lt;BR /&gt;// Depending on your source script, there are different options of handling
// getting the reference to dt1 and dt2
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");&lt;BR /&gt;
dt2 &amp;lt;&amp;lt; Delete Scripts(dt2 &amp;lt;&amp;lt; Get Table Script Names); // for demo purposes
wait(1); // for demo purposes
&lt;BR /&gt;t_scripts = dt1 &amp;lt;&amp;lt; Get Table Script Names;
Remove From(t_scripts, Contains(t_scripts, "Source"), 1);&lt;BR /&gt;
For Each({t_script}, t_scripts,
	Eval(EvalExpr(
		dt2 &amp;lt;&amp;lt; New Script(t_script,
			Expr(dt1 &amp;lt;&amp;lt; Get Script(t_script));
		);
	));
);
wait(0);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 24 Aug 2024 05:15:42 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-08-24T05:15:42Z</dc:date>
    <item>
      <title>Automate copying table scripts when rerunning "source"</title>
      <link>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783705#M96833</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am creating a database in Excel that will be continually updated. New rows and columns will be added periodically, and existing rows will occasionally have new data added. As such I have started making use of the "Source" script to update the corresponding downstream JMP table.&lt;/P&gt;&lt;P&gt;The question I have is, is there a way to bring over any existing table scripts to the updated table when running the Source script? I have a number of graph builder scripts saved to the JMP table and would like to automatically copy them over to the new table each time the Source script is run. I use JMP version 17.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 19:28:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783705#M96833</guid>
      <dc:creator>sowiakg</dc:creator>
      <dc:date>2024-08-23T19:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automate copying table scripts when rerunning "source"</title>
      <link>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783717#M96835</link>
      <description>&lt;P&gt;Welcome to the community.&lt;/P&gt;
&lt;P&gt;Here is an example of the code required to copy all of the table scripts from one data table to another, minus the Source table script.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
names=dt&amp;lt;&amp;lt;get table Script names;
remove from(names,1,1);
dt &amp;lt;&amp;lt; Select Properties( names );
proplist = dt &amp;lt;&amp;lt; Get Selected Properties();
dt2 = New Table( "Little Class" );
dt2 &amp;lt;&amp;lt; Add scripts to table( proplist );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You would have to add this methodology to your Source script, or run it as a separate script to do what you are trying to do.&lt;/P&gt;
&lt;P&gt;You can find details and examples of the different elements in this script in the Scripting Index under the Help pull down menu&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 21:03:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783717#M96835</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-23T21:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Automate copying table scripts when rerunning "source"</title>
      <link>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783737#M96837</link>
      <description>&lt;P&gt;Here is other option&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
&lt;BR /&gt;// Depending on your source script, there are different options of handling
// getting the reference to dt1 and dt2
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");&lt;BR /&gt;
dt2 &amp;lt;&amp;lt; Delete Scripts(dt2 &amp;lt;&amp;lt; Get Table Script Names); // for demo purposes
wait(1); // for demo purposes
&lt;BR /&gt;t_scripts = dt1 &amp;lt;&amp;lt; Get Table Script Names;
Remove From(t_scripts, Contains(t_scripts, "Source"), 1);&lt;BR /&gt;
For Each({t_script}, t_scripts,
	Eval(EvalExpr(
		dt2 &amp;lt;&amp;lt; New Script(t_script,
			Expr(dt1 &amp;lt;&amp;lt; Get Script(t_script));
		);
	));
);
wait(0);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Aug 2024 05:15:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783737#M96837</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-24T05:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Automate copying table scripts when rerunning "source"</title>
      <link>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783743#M96838</link>
      <description>&lt;P&gt;Another approach:&lt;BR /&gt;Upgrade to JMP 18, it's free for all licensed users.&lt;BR /&gt;&lt;BR /&gt;In JMP 18, besides the Source Script, there is an &lt;STRONG&gt;Update Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1724503652787.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67485iD9AE5893EDA9FAB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1724503652787.png" alt="hogi_0-1724503652787.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which will update the table itself - insted of creating a new one. Manually added scripts stay.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pros of "Update Table" compared to "Source Scripts:&lt;BR /&gt;Source Scripts are "fragile" - JMP overwrites them without warning:&lt;BR /&gt;&lt;LI-MESSAGE title="Update &amp;amp;amp; Concatenate: source script collision" uid="590519" url="https://community.jmp.com/t5/JMP-Wish-List/Update-amp-Concatenate-source-script-collision/m-p/590519#U590519" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cons:&lt;BR /&gt;Update Table removes any manually added column&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/JMP-Wish-List/Wizard-to-update-Excel-files-in-place-no-code-solution/idc-p/761983/highlight/true#M5540" target="_blank" rel="noopener"&gt;https://community.jmp.com/t5/JMP-Wish-List/Wizard-to-update-Excel-files-in-place-no-code-solution/idc-p/761983/highlight/true#M5540&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 20:27:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/783743#M96838</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-10-15T20:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Automate copying table scripts when rerunning "source"</title>
      <link>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/805754#M98406</link>
      <description>&lt;P&gt;I know I just left another comment saying how I see your JMP help everywhere and it's really appreciated. But seriously. I see your help&amp;nbsp;&lt;EM&gt;everywhere&lt;/EM&gt; and it's so useful. Thanks for all you do to help people out.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 14:20:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Automate-copying-table-scripts-when-rerunning-quot-source-quot/m-p/805754#M98406</guid>
      <dc:creator>Thomas_Kilmer</dc:creator>
      <dc:date>2024-10-15T14:20:11Z</dc:date>
    </item>
  </channel>
</rss>

