<?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[Set Sustom Attribute]]></title><description><![CDATA[<p dir="auto">hi all,<br />
i have tried the Function <strong>SetCustomAttribute</strong> in script library. than i configured <strong>Action</strong> to Execute the script for Event <strong>Sys_Node_Added</strong>. it works fine for all the new added Nodes with same custom attribute value.<br />
now what i want is that custom attrubute value should be added node Hostname.<br />
So i used this<br />
<strong>SetCustomAttribute($node, "Node_HostName", "%n")</strong><br />
but i get the Value %n. why macro didn't work here. secondly how to set the custom attribute for the Interfaces or Instance.</p>
<p dir="auto">thank you,<br />
Percy</p>
]]></description><link>https://forum.netxms.org/topic/2966/set-sustom-attribute</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 08:25:31 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2966.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Feb 2014 06:37:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Set Sustom Attribute on Thu, 27 Feb 2014 09:50:48 GMT]]></title><description><![CDATA[<p dir="auto">hi victor ,</p>
<p dir="auto">this works fine for new added nodes...how to set custom attribute for those which were previously added nodes. and not getting the Custom attribute for the Interfaces. how to apply the script to the interfaces.</p>
<p dir="auto">thank you<br />
Percy</p>
]]></description><link>https://forum.netxms.org/post/13032</link><guid isPermaLink="true">https://forum.netxms.org/post/13032</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 27 Feb 2014 09:50:48 GMT</pubDate></item><item><title><![CDATA[Reply to Set Sustom Attribute on Thu, 27 Feb 2014 06:28:25 GMT]]></title><description><![CDATA[<p dir="auto">hi Victor,</p>
<p dir="auto">Thank you so much for the support...yes its working.</p>
<p dir="auto">Regards !<br />
Percy</p>
]]></description><link>https://forum.netxms.org/post/13026</link><guid isPermaLink="true">https://forum.netxms.org/post/13026</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 27 Feb 2014 06:28:25 GMT</pubDate></item><item><title><![CDATA[Reply to Set Sustom Attribute on Wed, 26 Feb 2014 12:41:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Macros only works in string expansion for events, alarms, and actions. Strings withing scripts are just strings. If you want to set current node name as custom attribute, you can do it like following:</p>
<p dir="auto">SetCustomAttribute($node, "Node_HostName", $node-&gt;name);</p>
<p dir="auto">You can find interface object using FindInterfaceObject function, and then use SetCustomAttribute as usual to set custom attribute for interface.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/12993</link><guid isPermaLink="true">https://forum.netxms.org/post/12993</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 26 Feb 2014 12:41:06 GMT</pubDate></item></channel></rss>