<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ReferenceError on Meta Data Source script]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">This is related to Core 3.6.4 / Meta 3.6.2.</p>
<p dir="auto">When attempting a simple script</p>
<pre><code>var myTotal = (p1148.value + p1164.value + p1068.value + p22238.value);
return(myTotal);
</code></pre>
<p dir="auto">I receive the following error that I was hoping someone could shed some light on -</p>
<pre><code>ReferenceError: "$EXEC" is not defined at line: 23 at line: 23
</code></pre>
<p dir="auto">Thank you</p>
]]></description><link>https://forum.mango-os.com/topic/4746/referenceerror-on-meta-data-source-script</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 05:59:51 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4746.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Mar 2020 15:23:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ReferenceError on Meta Data Source script on Mon, 23 Mar 2020 18:28:36 GMT]]></title><description><![CDATA[<p dir="auto">Thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/terrypacker" aria-label="Profile: terrypacker">@<bdi>terrypacker</bdi></a>. I had a global script using <code>$EXEC</code><br />
Once I removed that the script would execute.</p>
]]></description><link>https://forum.mango-os.com/post/24953</link><guid isPermaLink="true">https://forum.mango-os.com/post/24953</guid><dc:creator><![CDATA[Wingnut2.0]]></dc:creator><pubDate>Mon, 23 Mar 2020 18:28:36 GMT</pubDate></item><item><title><![CDATA[Reply to ReferenceError on Meta Data Source script on Fri, 13 Mar 2020 18:08:50 GMT]]></title><description><![CDATA[<p dir="auto">@Wingnut2-0 any chance you have global scripts with a call to <code>$EXEC</code></p>
<p dir="auto">Seems like line 23 would indicate that script of 2 lines has a lot more to it than what you shared.  Which usually means there are global scripts being put into the context.</p>
<p dir="auto">One thing to check is the script permissions.  I know that in later versions of mango we restricted the environment when it does not have superadmin permission.  I am not sure how the <code>$EXEC</code> call will perform in that situation.</p>
]]></description><link>https://forum.mango-os.com/post/24922</link><guid isPermaLink="true">https://forum.mango-os.com/post/24922</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Fri, 13 Mar 2020 18:08:50 GMT</pubDate></item><item><title><![CDATA[Reply to ReferenceError on Meta Data Source script on Fri, 13 Mar 2020 11:24:28 GMT]]></title><description><![CDATA[<p dir="auto">I receive the error when validating the script in both the v3 and legacy UI.</p>
<p dir="auto">I checked and on this particular instance of mango I had made the changes referenced here<br />
<a href="https://forum.infiniteautomation.com/topic/4503/simple-ping-monitor" rel="nofollow ugc">https://forum.infiniteautomation.com/topic/4503/simple-ping-monitor</a><br />
and here<br />
<a href="https://forum.infiniteautomation.com/topic/3818/invoke-shell-commands-from-a-scripting-environment" rel="nofollow ugc">https://forum.infiniteautomation.com/topic/3818/invoke-shell-commands-from-a-scripting-environment</a></p>
]]></description><link>https://forum.mango-os.com/post/24918</link><guid isPermaLink="true">https://forum.mango-os.com/post/24918</guid><dc:creator><![CDATA[Wingnut2.0]]></dc:creator><pubDate>Fri, 13 Mar 2020 11:24:28 GMT</pubDate></item><item><title><![CDATA[Reply to ReferenceError on Meta Data Source script on Fri, 13 Mar 2020 08:21:02 GMT]]></title><description><![CDATA[<p dir="auto">@wingnut2-0 said in <a href="/post/24911">ReferenceError on Meta Data Source script</a>:</p>
<blockquote>
<p dir="auto">var myTotal = (p1148.value + p1164.value + p1068.value + p22238.value);<br />
return(myTotal);</p>
</blockquote>
<p dir="auto">I am not able to reproduce this error on the same version of mango.  Could you provide more information?<br />
Is this on the v3 UI or legacy UI?<br />
Do you get that error when trying to validate the script?<br />
Can you export you points JSON and paste is here?</p>
]]></description><link>https://forum.mango-os.com/post/24915</link><guid isPermaLink="true">https://forum.mango-os.com/post/24915</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Fri, 13 Mar 2020 08:21:02 GMT</pubDate></item><item><title><![CDATA[Reply to ReferenceError on Meta Data Source script on Thu, 12 Mar 2020 16:51:38 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/craigweb" aria-label="Profile: CraigWeb">@<bdi>CraigWeb</bdi></a><br />
I corrected that and continue to have the same error.</p>
]]></description><link>https://forum.mango-os.com/post/24913</link><guid isPermaLink="true">https://forum.mango-os.com/post/24913</guid><dc:creator><![CDATA[Wingnut2.0]]></dc:creator><pubDate>Thu, 12 Mar 2020 16:51:38 GMT</pubDate></item><item><title><![CDATA[Reply to ReferenceError on Meta Data Source script on Thu, 12 Mar 2020 16:08:27 GMT]]></title><description><![CDATA[<p dir="auto">@Wingnut2-0 No need for the parenthesis around <code>(myTotal)</code> should just be <code>return myTotal</code></p>
]]></description><link>https://forum.mango-os.com/post/24912</link><guid isPermaLink="true">https://forum.mango-os.com/post/24912</guid><dc:creator><![CDATA[CraigWeb]]></dc:creator><pubDate>Thu, 12 Mar 2020 16:08:27 GMT</pubDate></item></channel></rss>