<?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[Transformations Scripts for table DCI]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">NetXMS is a very good programm, i think.<br />
I´ve the following problem with transformation scripts of table dci´s: For example i have a dci named voltage. In this DCI there are three colums: description (string), voltage (integer) and the status (string).<br />
Unfortunally the voltage is with factor 1000 and the status is orgininal an integer (f. ex. 3 = is okay)<br />
Now I want to transform the voltage to the real value (1200 to 1,2) and the status value to an status text (3 = OK).<br />
I have transformation scrips for "simple" parameters - they are working. But they don´t work with table dci.<br />
So I want to ask for help and for an example. Thanks a lot.</p>
]]></description><link>https://forum.netxms.org/topic/3050/transformations-scripts-for-table-dci</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 14:00:38 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3050.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Apr 2014 14:20:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transformations Scripts for table DCI on Thu, 05 Jun 2014 21:15:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">getColumnIndex is a method of Table class, so you should use it as $1-&gt;getColumnIndex in transformation script, like you do with get method.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/14077</link><guid isPermaLink="true">https://forum.netxms.org/post/14077</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 05 Jun 2014 21:15:09 GMT</pubDate></item><item><title><![CDATA[Reply to Transformations Scripts for table DCI on Tue, 03 Jun 2014 13:45:02 GMT]]></title><description><![CDATA[<p dir="auto">Aditionaly template in attach.</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001781-netxms-snmpTable-storage.xml">netxms-snmpTable-storage.xml</a></p>
]]></description><link>https://forum.netxms.org/post/14053</link><guid isPermaLink="true">https://forum.netxms.org/post/14053</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Tue, 03 Jun 2014 13:45:02 GMT</pubDate></item><item><title><![CDATA[Reply to Transformations Scripts for table DCI on Tue, 03 Jun 2014 13:40:52 GMT]]></title><description><![CDATA[<p dir="auto">I try to do same.<br />
But result is not set correctly (snmp value is set in place of calculated value).<br />
Screenshot in attach.<br />
transformation script:</p>
<pre><code>Percnt = getColumnIndex("StorageUsedPercent");
Used = getColumnIndex("hrStorageUsed");
Size = getColumnIndex("hrStorageSize");
for (i = 0; i &lt; $1-&gt;rowCount; i++)
{
if ( $1-&gt;get(i, Used) &gt; 0 &amp;&amp; $1-&gt;get(i, Size) &gt; 0 )
{
$1-&gt;set(i, Percnt, ($1-&gt;get(i, Used) / $1-&gt;get(i, Size) * 100) );
}
else
{
$1-&gt;set(i, Percnt, 0 );
}
</code></pre>
<p dir="auto">Also I have noticed, that there are no any notification if table colums set not right.</p>
<p dir="auto">How to set <em>Dummy</em> column?</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001771-TableGeneral.PNG" alt="TableGeneral.PNG" class="img-markdown  img-fluid" width="623" height="534" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001773-TableColumns.PNG" alt="TableColumns.PNG" class="img-markdown  img-fluid" width="986" height="532" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001775-TableTransform.PNG" alt="TableTransform.PNG" class="img-markdown  img-fluid" width="988" height="533" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001777-TableThresholds.PNG" alt="TableThresholds.PNG" class="img-markdown  img-fluid" width="986" height="530" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001779-TableResult.PNG" alt="TableResult.PNG" class="img-markdown  img-fluid" width="1212" height="177" /></p>
]]></description><link>https://forum.netxms.org/post/14052</link><guid isPermaLink="true">https://forum.netxms.org/post/14052</guid><dc:creator><![CDATA[andrey--k]]></dc:creator><pubDate>Tue, 03 Jun 2014 13:40:52 GMT</pubDate></item><item><title><![CDATA[Reply to Transformations Scripts for table DCI on Thu, 03 Apr 2014 06:10:49 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor,</p>
<p dir="auto">thank you so much. I guess, I never match the solution for my problem by myself...<br />
Your solution works fine.</p>
]]></description><link>https://forum.netxms.org/post/13432</link><guid isPermaLink="true">https://forum.netxms.org/post/13432</guid><dc:creator><![CDATA[Christian021]]></dc:creator><pubDate>Thu, 03 Apr 2014 06:10:49 GMT</pubDate></item><item><title><![CDATA[Reply to Transformations Scripts for table DCI on Wed, 02 Apr 2014 17:30:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">It could looks like following:</p>
<pre><code>idxVoltage = $1-&gt;getColumnIndex("VOLTAGE");
idxStatus = $1-&gt;getColumnIndex("STATUS");

for(i = 0; i &lt; $1-&gt;rowCount; i++)
{
   $1-&gt;set(i, idxVoltage, $1-&gt;get(i, idxVoltage) / 1000);
   if ($1-&gt;get(i, idxStatus) == 3)
   {
      $1-&gt;set(i, idxStatus, "OK");
   }
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13421</link><guid isPermaLink="true">https://forum.netxms.org/post/13421</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 02 Apr 2014 17:30:24 GMT</pubDate></item></channel></rss>