<?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[Transformation script and $dci object]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I try use (or get) current dci name on the transformation script, but i get error message:<br />
<em>Error 14 in line 8: Function or operation argument is not an object</em></p>
<p dir="auto">Script line:<br />
<em>dciName = $dci-&gt;name;</em></p>
<p dir="auto">My Netxms version is 1.2.14</p>
<p dir="auto">Rgs<br />
 TM</p>
]]></description><link>https://forum.netxms.org/topic/3241/transformation-script-and-dci-object</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:44:39 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3241.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Jun 2014 10:35:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transformation script and $dci object on Fri, 27 Jun 2014 14:39:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Currently there are no other way to show dashboard without giving read access to nodes where data is collected, so your approach is absolutely right.</p>
<p dir="auto">As for the script, it's actually a bug - in test mode $dci variable is not set. I'll fix it in the next release.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/14318</link><guid isPermaLink="true">https://forum.netxms.org/post/14318</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 27 Jun 2014 14:39:32 GMT</pubDate></item><item><title><![CDATA[Reply to Transformation script and $dci object on Fri, 27 Jun 2014 10:19:12 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Sorry, that was my mistake.<br />
Parameter what i need to get is description (<a href="http://wiki.netxms.org/wiki/NXSL:DCI" rel="nofollow ugc">http://wiki.netxms.org/wiki/NXSL:DCI</a>).</p>
<p dir="auto">I created a dummy dci (parameter: Dummy, Origin: Internal, Data Type: string) and here are my simple test scripts:</p>
<p dir="auto"><em>sub main()<br />
{<br />
 dciName = $dci-&gt;name;<br />
 return dciName;<br />
}</em><br />
When i click test button it shows error, but when script is "running on the server" the last value tab (and history) shows dummy.</p>
<p dir="auto"><em>sub main()<br />
{<br />
 dciName = $dci-&gt;description;<br />
 return dciName;<br />
}</em><br />
When i click test button it shows error, but when script is "running on the server" the last value tab (and history) shows dci description.</p>
<p dir="auto"><em>sub main()<br />
{<br />
 nodeName = $node-&gt;name;<br />
 return nodeName;<br />
}</em><br />
When i click test button it shows node name.</p>
<p dir="auto">Many thanks for your quick reply.</p>
<p dir="auto">Here is a long story and full script ...and sorry my bad english <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">I try build dashbord that shows network statistic (eg. uplinks traffic (bytes/sec), port usage (%), router cpu usage, jne.) or network "heatmap". Users that can see this dashboard does not need see any other data on the devices.</p>
<p dir="auto">First at all i created "readonly" user that only have rights to the one dashboard, but then i get errors that user does not have nesessary rights to read the dci data. So next i give read right to Device container and now dashboard works ok, but user see too much data on devices (and can do snmp walk).<br />
I didn't found any option to give rights to only read dci data, so now i try create dummy object that have nesessary dcis.</p>
<p dir="auto">I hope that there is is a another way to do this kind of dashboard, so any tips/ideas are more than wellcome  <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
<p dir="auto">This is script and now it works, but if i click test button i get error.</p>
<p dir="auto"><em>sub main()<br />
{<br />
//Custom attribute "source_node"<br />
value_sourceNode = GetCustomAttribute($node, "source_node");</em></p>
<p dir="auto"><em>//DCI description, it will need to be same as dci what we want read<br />
dciDescription = $dci-&gt;description;</em></p>
<p dir="auto"><em>value_SourceObject = FindNodeObject($node, value_sourceNode);<br />
value_DCIid = FindDCIByDescription(value_SourceObject, dciDescription);<br />
value_DCIdata = GetDCIValue(value_SourceObject, value_DCIid);<br />
return value_DCIdata;<br />
}</em></p>
<p dir="auto">Rgs<br />
 TM</p>
]]></description><link>https://forum.netxms.org/post/14314</link><guid isPermaLink="true">https://forum.netxms.org/post/14314</guid><dc:creator><![CDATA[tuomar]]></dc:creator><pubDate>Fri, 27 Jun 2014 10:19:12 GMT</pubDate></item><item><title><![CDATA[Reply to Transformation script and $dci object on Thu, 26 Jun 2014 15:24:21 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Just test it, and it works as expected. Can you please show full script?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/14301</link><guid isPermaLink="true">https://forum.netxms.org/post/14301</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 26 Jun 2014 15:24:21 GMT</pubDate></item></channel></rss>