<?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 Loading jsl scripts into a data table by another script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899807#M105980</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I have several scripts (XXX.jsl) generating seperate reports with many graphs inside each of these reports. And i have a second script which loads data from an exel file, modifies the resulting JMP table and saves the table.&lt;BR /&gt;&lt;BR /&gt;I would be interested to include in the second script a section which loads these report scripts from a folder and makes these available in the upper left box of the JMP table.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am doing this because I create a JMP script which should be used by my colleagues. They should just change the file path of the excel file and run the script. With that they should get the JMP table and based on their current table the option to run the reports.&lt;BR /&gt;&lt;BR /&gt;I am sure there is an option, but currently approaches with e.g. include() failed or &amp;lt;&amp;lt; save script to data table failed.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Sep 2025 11:46:53 GMT</pubDate>
    <dc:creator>Jo_E</dc:creator>
    <dc:date>2025-09-11T11:46:53Z</dc:date>
    <item>
      <title>Loading jsl scripts into a data table by another script</title>
      <link>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899807#M105980</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have several scripts (XXX.jsl) generating seperate reports with many graphs inside each of these reports. And i have a second script which loads data from an exel file, modifies the resulting JMP table and saves the table.&lt;BR /&gt;&lt;BR /&gt;I would be interested to include in the second script a section which loads these report scripts from a folder and makes these available in the upper left box of the JMP table.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am doing this because I create a JMP script which should be used by my colleagues. They should just change the file path of the excel file and run the script. With that they should get the JMP table and based on their current table the option to run the reports.&lt;BR /&gt;&lt;BR /&gt;I am sure there is an option, but currently approaches with e.g. include() failed or &amp;lt;&amp;lt; save script to data table failed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 11:46:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899807#M105980</guid>
      <dc:creator>Jo_E</dc:creator>
      <dc:date>2025-09-11T11:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Loading jsl scripts into a data table by another script</title>
      <link>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899828#M105981</link>
      <description>&lt;P&gt;Here is simple example which adds text from a file to table as 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");
dt &amp;lt;&amp;lt; Delete Scripts(dt &amp;lt;&amp;lt; Get Table Script Names);  // demo

script_txt = Load Text File("$SAMPLE_SCRIPTS/chaosGame.jsl");

Eval(EvalExpr(
	dt &amp;lt;&amp;lt; New Script("S",
		Expr(Parse(script_txt))
	);
));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you wish to keep comments, it will be slightly more complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Also if comments are not needed, you can use Include with &amp;lt;&amp;lt; Parse Only&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Delete Scripts(dt &amp;lt;&amp;lt; Get Table Script Names);  // demo

script_expr = Include("$SAMPLE_SCRIPTS/chaosGame.jsl", &amp;lt;&amp;lt; parse only);

Eval(EvalExpr(
	dt &amp;lt;&amp;lt; New Script("S",
		Expr(Name Expr(script_expr))
	);
));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 12:11:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899828#M105981</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-09-11T12:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Loading jsl scripts into a data table by another script</title>
      <link>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899829#M105982</link>
      <description>&lt;P&gt;Thank you very much for your quick reply.&lt;BR /&gt;Would it be possible that you explain this solution a bit more?&lt;BR /&gt;With "Names Default To Here(1); you set your local name space.&lt;/P&gt;
&lt;P&gt;Then you open a jmp table and delete the scripts which came with the opened tabel, correct?&lt;BR /&gt;This is followed by the part dealing with the script which should be loaded. You define the variable script_txt and this should be the loaded text file from the given directory. What do the last five rows of code do, could you explain it a bit.&lt;BR /&gt;I always like to understand what the code does in detail. This helps me a lot to avoid simple but fatal errors during implementation.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 12:22:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899829#M105982</guid>
      <dc:creator>Jo_E</dc:creator>
      <dc:date>2025-09-11T12:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loading jsl scripts into a data table by another script</title>
      <link>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899831#M105983</link>
      <description>&lt;P&gt;I suggest reading &lt;A href="https://www.jmp.com/support/help/en/18.2/#page/jmp/introduction-to-writing-jsl-scripts.shtml#" target="_blank" rel="noopener"&gt;JMP Scripting Guide&lt;/A&gt; for the basics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Regarding Names Default To Here(1); you should just always start your scripts with it,&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.2/#page/jmp/advanced-scoping-and-namespaces.shtml" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; Programming Methods &amp;gt; Advanced Scoping and Namespaces&lt;/A&gt;&amp;nbsp;.&lt;/LI&gt;
&lt;LI&gt;Opening table and the removal of scripts are just for demo purposes to make it easier to show what is going on.&lt;/LI&gt;
&lt;LI&gt;Last parts are using expression evaluation to make sure you get the script into your table in correct format, for it to be easy to run,&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.2/#page/jmp/advanced-expressions-macros-and-lists.shtml" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; Programming Methods &amp;gt; Advanced Expressions, Macros, and Lists&lt;/A&gt;&amp;nbsp;.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 11 Sep 2025 12:27:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899831#M105983</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-09-11T12:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Loading jsl scripts into a data table by another script</title>
      <link>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899832#M105984</link>
      <description>&lt;P&gt;Great thank you it works! And thank you very much for the explanation.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 12:30:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loading-jsl-scripts-into-a-data-table-by-another-script/m-p/899832#M105984</guid>
      <dc:creator>Jo_E</dc:creator>
      <dc:date>2025-09-11T12:30:08Z</dc:date>
    </item>
  </channel>
</rss>

