<?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[White space or formatting rules for filter scripts or other scripts]]></title><description><![CDATA[<p dir="auto">I spent about 2-3 hours yesterday trying to work out an instance discovery filter script for a template I am working on. I copied and pasted a portion of a script from the Hook::ConfigurationPoll script I got from another forum post to remove dynamic interfaces from Mikrotik routers.</p>
<p dir="auto">This script worked the first time I added it into the ConfigurigationPoll script, but in the instance discovery filter it wouldn't work. I tried various combinations of the same things, but it never worked. After looking through all the docs I could find on syntax and such, I changed the formatting so things would be more pretty. I only used one space character and a single line feed and nothing else. After "pretty printing" my script it started working.</p>
<p dir="auto">Are there any special rules or restrictions for scripts on formatting, white space, capitalization, etc. that I should keep in mind when writing scripts?</p>
<p dir="auto">Also, is there a way to debug a filter script or get NetXMS to show parsing errors or compilation errors of any sort?</p>
]]></description><link>https://forum.netxms.org/topic/5308/white-space-or-formatting-rules-for-filter-scripts-or-other-scripts</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 16:55:32 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5308.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Nov 2017 11:34:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to White space or formatting rules for filter scripts or other scripts on Thu, 02 Nov 2017 12:40:01 GMT]]></title><description><![CDATA[<p dir="auto">It might have been my capitalization of true and false. In the admin guide on p123 under Instance Filter it shows them as TRUE and FALSE. I think I tried camel case as well as all lower case, but there might have been other capitalization issues as well during my attempts that kept it from working. Right now I have all lower case and that seems to be working.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.netxms.org/post/23323</link><guid isPermaLink="true">https://forum.netxms.org/post/23323</guid><dc:creator><![CDATA[Kevo]]></dc:creator><pubDate>Thu, 02 Nov 2017 12:40:01 GMT</pubDate></item><item><title><![CDATA[Reply to White space or formatting rules for filter scripts or other scripts on Thu, 02 Nov 2017 08:10:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">scripts are case-sensitive - i.e. <strong>node</strong> and <strong>Node</strong> are two different identifiers. There are no restrictions on formatting, white spaces, new lines, etc.</p>
<p dir="auto">You can test your scripts by selecting "execute server script" option on a node. Script will have $node variable set, and you can use trace function or print statement to generate debug output that will be seen in output field during script execution.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/23299</link><guid isPermaLink="true">https://forum.netxms.org/post/23299</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 02 Nov 2017 08:10:20 GMT</pubDate></item></channel></rss>