<?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[get values from a DCI table with a tranform script]]></title><description><![CDATA[<p dir="auto">Can someone give me an example of a transform script that pulls a value from a DCI table into a variable?</p>
]]></description><link>https://forum.netxms.org/topic/3863/get-values-from-a-dci-table-with-a-tranform-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:24:05 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3863.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Jul 2015 14:47:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to get values from a DCI table with a tranform script on Wed, 08 Jul 2015 19:49:55 GMT]]></title><description><![CDATA[<p dir="auto">Line like this:</p>
<pre><code>table = AgentReadTable($node, "System.Processes");
</code></pre>
<p dir="auto">will read agent table (System.Processes in this example) into variable. It will be object variable of class <a href="https://wiki.netxms.org/wiki/NXSL:Table" rel="nofollow ugc">Table</a>. Then you can walk through table using it's methods. For example, to read value of column "NAME" in first row you can use the following code:</p>
<pre><code>colIndex = table-&gt;getColumnIndex("NAME");
value = table-&gt;get(0, colIndex);
</code></pre>
<p dir="auto">You can iterate through table using rowCount attribute as stop indicator:</p>
<pre><code>for(row = 0; row &lt; table-&gt;rowCount; row++)
{
   value = table-&gt;get(row, colIndex);
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
<p dir="auto">P.S. If you meant transformation script of a table DCI, then you don't need to read table - variable $1 will hold table object.</p>
]]></description><link>https://forum.netxms.org/post/17281</link><guid isPermaLink="true">https://forum.netxms.org/post/17281</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 08 Jul 2015 19:49:55 GMT</pubDate></item></channel></rss>