<?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[How to pass parameter to script]]></title><description><![CDATA[<p dir="auto">How can I pass parameters to user-defined scripts?<br />
How can I pass instance parameter (parameter %6 which is DCI's instance attribute) from action-definition to user-defined script (because calling user-defined script is in format %[scriptname])?</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://forum.netxms.org/topic/488/how-to-pass-parameter-to-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:19:41 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/488.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Oct 2008 16:21:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to pass parameter to script on Tue, 14 Oct 2008 16:52:31 GMT]]></title><description><![CDATA[<p dir="auto">In the script, you have access to all event attributes via $event variable, which is an object of class NetXMS_Event with the following attributes:<br />
code - event code<br />
id - event id<br />
severity - event severity (as number)<br />
timestamp - event timestamp (as UNIX timestamp)<br />
message - event message text<br />
userTag - user tag associated with event<br />
parameters[] - array with event parameters</p>
<p dir="auto">So, to access event's parameter 6, you should use</p>
<pre><code>$event-&gt;parameters[6]
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/2450</link><guid isPermaLink="true">https://forum.netxms.org/post/2450</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 14 Oct 2008 16:52:31 GMT</pubDate></item></channel></rss>