<?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[Netxms script filter for template]]></title><description><![CDATA[<p dir="auto">Hi guys,</p>
<p dir="auto">Im trying find a script for tidy my computers in my Template.</p>
<p dir="auto">i tried a script but it doesnt work with template so i need help<br />
i would like a script to say " if the name of the pc or printer start with CAB or cab you have to put it in this your template "</p>
<p dir="auto">By the way sorry for my english, im french and its a bit difficult thanks in advance.</p>
]]></description><link>https://forum.netxms.org/topic/6268/netxms-script-filter-for-template</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:33:52 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6268.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 12 Nov 2019 09:29:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Netxms script filter for template on Tue, 12 Nov 2019 12:52:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">problem is that name of those nodes does not starts with "cab", it is in the middle. If you want to match any node that <strong>contains</strong> cab it will be different:</p>
<pre><code>return $node-&gt;name imatch ".*cab.*";
</code></pre>
<p dir="auto">This will match any name with letter combination cab at any position using regular expression. If you want something more complex you can use more complex regular expression. Site <a href="https://regex101.com/" rel="nofollow ugc">https://regex101.com/</a> is a good resource for testing your expressions.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/26925</link><guid isPermaLink="true">https://forum.netxms.org/post/26925</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 12 Nov 2019 12:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to Netxms script filter for template on Tue, 12 Nov 2019 15:07:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi Viktor,</p>
<p dir="auto">i tried your script but nothing happened.</p>
<p dir="auto">but how can i do for the ' pc-cab goes to template 'CAB' with a script<br />
the script will be different no ?<br />
sorry im so newbie about this ...</p>
]]></description><link>https://forum.netxms.org/post/26923</link><guid isPermaLink="true">https://forum.netxms.org/post/26923</guid><dc:creator><![CDATA[nannard]]></dc:creator><pubDate>Tue, 12 Nov 2019 15:07:34 GMT</pubDate></item><item><title><![CDATA[Reply to Netxms script filter for template on Tue, 12 Nov 2019 09:34:46 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">you can try this script:</p>
<pre><code>p = substr($node-&gt;name, 1, 3);
return (p == "cab") || (p == "CAB");
</code></pre>
<p dir="auto">This will add nodes with names starting with CAB or cab (but not Cab or caB). If case is actually not important at all you can use simply</p>
<pre><code>return $node-&gt;name ilike "CAB*";
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/26921</link><guid isPermaLink="true">https://forum.netxms.org/post/26921</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 12 Nov 2019 09:34:46 GMT</pubDate></item></channel></rss>