<?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[Value formatting]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">How can i get clean formatted value in last value window (or better as event parameter)? What I want to do is format or round disk space value.<br />
The value shows up like 12.410000 , but it should be like 12.41 (as it shows in history table)  because transformation script is: format($1,1,2) or round($1,2).</p>
<p dir="auto">And event parameter %4 is also taking those zeros. How can I get rid of those zeros?</p>
<p dir="auto">Nikk</p>
]]></description><link>https://forum.netxms.org/topic/3015/value-formatting</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:25:03 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3015.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Mar 2014 15:35:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Value formatting on Tue, 10 Dec 2019 08:46:10 GMT]]></title><description><![CDATA[<p dir="auto">Ok, figured it out.</p>
<p dir="auto">Used the script in the message of the event's event configuration and it worked perfect...</p>
]]></description><link>https://forum.netxms.org/post/27116</link><guid isPermaLink="true">https://forum.netxms.org/post/27116</guid><dc:creator><![CDATA[Shebarn]]></dc:creator><pubDate>Tue, 10 Dec 2019 08:46:10 GMT</pubDate></item><item><title><![CDATA[Reply to Value formatting on Tue, 10 Dec 2019 07:46:47 GMT]]></title><description><![CDATA[<p dir="auto">I have the same problem with voltage return as float.</p>
<p dir="auto">My Transformation looks like this normally:</p>
<p dir="auto">return $1/10;</p>
<p dir="auto">(since the value returned is always 10x the actual voltage value)</p>
<p dir="auto">But this always gives me a value of i.e. 23.500000</p>
<p dir="auto">return format($1/10, 1, 1) gives the right value when I test it at transformation but not when the alarm is raised.</p>
<p dir="auto">I tried Victor's solution of script:</p>
<p dir="auto">Script Name: retvolt<br />
Script Content: return format($event-&gt;parameters[1]/10, 1, 1);</p>
<p dir="auto">At transformation I then put: return $[retvolt];</p>
<p dir="auto">I get error: Error 34 in line 1: Function or operation argument is not a container</p>
<p dir="auto">I assume I am calling the script the wrong way, but can't find examples of how to do it otherwise?<br />
Please help.</p>
]]></description><link>https://forum.netxms.org/post/27115</link><guid isPermaLink="true">https://forum.netxms.org/post/27115</guid><dc:creator><![CDATA[Shebarn]]></dc:creator><pubDate>Tue, 10 Dec 2019 07:46:47 GMT</pubDate></item><item><title><![CDATA[Reply to Value formatting on Mon, 31 Mar 2014 07:09:41 GMT]]></title><description><![CDATA[<p dir="auto">Thank you, Victor! Works great <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>
]]></description><link>https://forum.netxms.org/post/13359</link><guid isPermaLink="true">https://forum.netxms.org/post/13359</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 31 Mar 2014 07:09:41 GMT</pubDate></item><item><title><![CDATA[Reply to Value formatting on Tue, 25 Mar 2014 17:32:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">You can format event parameter using script, like this:</p>
<ol>
<li>
<p dir="auto">use %[formatted_p4] instead of %4</p>
</li>
<li>
<p dir="auto">Create script named formatted_p4 in library like this:</p>
</li>
</ol>
<p dir="auto">return format($event-&gt;parameters[4], 1, 2);</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13288</link><guid isPermaLink="true">https://forum.netxms.org/post/13288</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 25 Mar 2014 17:32:10 GMT</pubDate></item></channel></rss>