<?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: Custom function not recognized when Graph Builder script is run via Run Script() but works when run manually in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Custom-function-not-recognized-when-Graph-Builder-script-is-run/m-p/954264#M110033</link>
    <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Thanks, man! You're a genius – such a simple fix, and it worked perfectly.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jun 2026 14:27:07 GMT</pubDate>
    <dc:creator>AggregateHare95</dc:creator>
    <dc:date>2026-06-17T14:27:07Z</dc:date>
    <item>
      <title>Custom function not recognized when Graph Builder script is run via Run Script() but works when run manually</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-not-recognized-when-Graph-Builder-script-is-run/m-p/954243#M110030</link>
      <description>&lt;P class="ds-markdown-paragraph"&gt;&lt;SPAN class=""&gt;I have created a custom JSL function and loaded it into the global environment. Then, in the Graph Builder interface, I used the "Custom Script" feature to incorporate this function into the graph script. After that, I saved the Graph Builder script to the data table (as a table script).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="ds-markdown-paragraph"&gt;&lt;SPAN class=""&gt;When I manually run the Graph Builder script from the data table (by clicking the script button from the table), everything works perfectly—the custom function is recognized and the graph is generated correctly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="ds-markdown-paragraph"&gt;&lt;SPAN class=""&gt;However, when I try to run the same table script programmatically using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE&gt;Run Script()&lt;/CODE&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function (e.g.,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE&gt;dt &amp;lt;&amp;lt; Run Script("Graph Builder")&lt;/CODE&gt;&lt;SPAN class=""&gt;), the script fails because it cannot find my custom function. It seems that&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE&gt;Run Script()&lt;/CODE&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;executes the script in an isolated context that does not have access to my globally defined function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=current data table();
dt&amp;lt;&amp;lt;run script("Column 1 vs. Column 1");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AggregateHare95_0-1781704169868.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/106823i91CFAE42C2887E25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AggregateHare95_0-1781704169868.png" alt="AggregateHare95_0-1781704169868.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="ds-markdown-paragraph"&gt;&lt;SPAN class=""&gt;Interestingly, built-in JMP functions are recognized fine, but my user‑defined function is not.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="ds-markdown-paragraph"&gt;&lt;SPAN class=""&gt;Has anyone else encountered this behavior? Is there a way to make&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE&gt;Run Script()&lt;/CODE&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;execute the table script in the same global namespace so that my custom function is visible? Any workarounds or explanations would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2026 13:53:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-not-recognized-when-Graph-Builder-script-is-run/m-p/954243#M110030</guid>
      <dc:creator>AggregateHare95</dc:creator>
      <dc:date>2026-06-17T13:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function not recognized when Graph Builder script is run via Run Script() but works when run manually</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-not-recognized-when-Graph-Builder-script-is-run/m-p/954253#M110031</link>
      <description>&lt;P&gt;You could prefix your function call withing your table script with :: (or global:) to access it from global namespace.&amp;nbsp;You could also consider using New Custom Function /named namespace for your function and modify the table script accordingly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2026 14:05:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-not-recognized-when-Graph-Builder-script-is-run/m-p/954253#M110031</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-06-17T14:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Custom function not recognized when Graph Builder script is run via Run Script() but works when run manually</title>
      <link>https://community.jmp.com/t5/Discussions/Custom-function-not-recognized-when-Graph-Builder-script-is-run/m-p/954264#M110033</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Thanks, man! You're a genius – such a simple fix, and it worked perfectly.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2026 14:27:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Custom-function-not-recognized-when-Graph-Builder-script-is-run/m-p/954264#M110033</guid>
      <dc:creator>AggregateHare95</dc:creator>
      <dc:date>2026-06-17T14:27:07Z</dc:date>
    </item>
  </channel>
</rss>

