<?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[Bug on CreateDCI Function]]></title><description><![CDATA[<p dir="auto">Hi, I think that on 4.0-2227 ther's a bug in CreateDCI Function, in docs pollingInterval parameter should be 0 for "default", but if you use it the new DCI will have 0 as pollinInterval time. If I use null all seems to be fine.<br />
retentionTime parameter works fine with "0", but with null do strange things, randomly some DCI will have default, somother will have a blank value</p>
<p dir="auto">Test script to test it:</p>
<pre><code>NodeName="xxxxx";  //existing node name

Mynode = FindObject(NodeName);

value=%(1,2,3,4,5,6,7,8,9,10);  //new dci names

for (v : value) {
     if (!FindDCIByName(Mynode, v))
     {
      		println("-------------------NEW----------------------------");
		newDci = CreateDCI(Mynode, DataSource::INTERNAL, v , "TEST " . v, DCI::FLOAT, null, 0);  // &lt;&lt;-- null,0 = OK  // null,null = random retentionTime result // 0,0 = 0 pollingInterval set
     }
    	else
    {
    		println("-------------------" . NodeName . "-&gt;". v . "  ALREADY EXIST----------------------------");
    }
}
</code></pre>
<p dir="auto">Thanks<br />
Alessandro</p>
]]></description><link>https://forum.netxms.org/topic/7342/bug-on-createdci-function</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:12:18 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7342.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 02 Apr 2022 10:24:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bug on CreateDCI Function on Mon, 04 Apr 2022 10:43:08 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Yes, it's a bug, it will be fixed and included in next patch release.</p>
]]></description><link>https://forum.netxms.org/post/31176</link><guid isPermaLink="true">https://forum.netxms.org/post/31176</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 04 Apr 2022 10:43:08 GMT</pubDate></item></channel></rss>