<?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[Possilbe bug: Float DCI values below 1 display unnecessary trailing zeroes with]]></title><description><![CDATA[<p dir="auto">Float DCI values between approximately 0.01 and 1 are displayed with unnecessary trailing zeroes when using a measurement unit with default multipliers.</p>
<p dir="auto">For example, I am monitoring current from a PDU over SNMP.</p>
<p dir="auto">The SNMP device returns integer values that are divided by 100 using a transformation script:</p>
<p dir="auto">return $1 / 100;</p>
<p dir="auto">For a phase current:</p>
<p dir="auto">Raw value: 303<br />
Transformed value: 3.03<br />
Displayed value: 3.03 A</p>
<p dir="auto">This is displayed correctly.</p>
<p dir="auto">However, for the neutral current:</p>
<p dir="auto">Raw value: 68<br />
Transformed value: 0.68<br />
Displayed value: 0.680000 A</p>
<p dir="auto">The expected display value would be:</p>
<p dir="auto">0.68 A<br />
Configuration<br />
NetXMS server/client version: 6.1.1<br />
DCI type: SNMP<br />
Data type: Float<br />
Unit: A<br />
Multipliers: Default<br />
Transformation:<br />
return $1 / 100;<br />
Steps to reproduce<br />
Create an SNMP DCI returning an integer value such as 68.<br />
Set the DCI data type to Float.<br />
Set the measurement unit to A.<br />
Leave multipliers at the default setting.<br />
Add the transformation:<br />
return $1 / 100;<br />
The transformation test correctly shows 0.68.<br />
After normal data collection, Last Values displays:<br />
0.680000 A</p>
<p dir="auto">Using the same configuration with a raw value such as 303 produces:</p>
<p dir="auto">3.03 A</p>
<p dir="auto">as expected.</p>
<p dir="auto">I also duplicated a working DCI that displayed 3.03 A correctly and changed only the SNMP OID so that the returned/transformed value was below 1. The duplicated DCI immediately showed the same 0.680000 A behavior, so the issue does not appear to be caused by a DCI configuration difference.</p>
<p dir="auto">Expected behavior</p>
<p dir="auto">Float values should use consistent formatting regardless of whether the value is above or below 1.</p>
<p dir="auto">For example:</p>
<p dir="auto">3.030000 -&gt; 3.03 A<br />
0.680000 -&gt; 0.68 A<br />
Actual behavior</p>
<p dir="auto">Values greater than or equal to 1 are formatted without unnecessary trailing zeroes:</p>
<p dir="auto">3.030000 -&gt; 3.03 A</p>
<p dir="auto">while values below 1 may retain the complete float string:</p>
<p dir="auto">0.680000 -&gt; 0.680000 A<br />
Additional information</p>
<p dir="auto">The behavior appears to still be present in the DataFormatter implementation in NetXMS 6.2.3 and current master.</p>
<p dir="auto">It appears that when the default multiplier logic cannot select a multiplier for a value below 1, the original value string is retained instead of being converted to a Double. The %s formatting path then only applies the normal decimal formatting when the value is a Double, causing the original 0.680000 string to be displayed unchanged.</p>
<p dir="auto">The underlying numeric DCI value appears to be correct; this seems to be a display/formatting issue.</p>
]]></description><link>https://forum.netxms.org/topic/8435/possilbe-bug-float-dci-values-below-1-display-unnecessary-trailing-zeroes-with</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:47:41 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/8435.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Aug 2026 10:07:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Possilbe bug: Float DCI values below 1 display unnecessary trailing zeroes with on Mon, 24 Aug 2026 10:30:28 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Confirmed, and thanks for tracing it - your reading is exactly right. When no multiplier applies the value stays a String, so the %s path skips the decimal trimming. Tracked as <a href="https://github.com/netxms/netxms/issues/3577" rel="nofollow ugc">https://github.com/netxms/netxms/issues/3577</a>.</p>
<p dir="auto">Until that's fixed, setting an explicit display format on the DCI works around it: %{m,u}.2f instead of leaving it empty. The f conversion parses the string into a number first, so the trimming happens. Cost is that it's per-DCI and pins you to two decimals regardless of magnitude.</p>
]]></description><link>https://forum.netxms.org/post/35734</link><guid isPermaLink="true">https://forum.netxms.org/post/35734</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Mon, 24 Aug 2026 10:30:28 GMT</pubDate></item></channel></rss>