<?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[Using Scripts in Action Messagetext]]></title><description><![CDATA[<p dir="auto">Within action messsage text it is possible to use the %[name] macro for generating output to message-text. The called funktion can have parameters. That works fine.</p>
<p dir="auto">The problem I want to solve is:<br />
Who to use the values of other macros as parameter for the function. E.g. %[script/myfunct(%z,%a,%c)] with the values of %z, %a and %c. The first tests I did are resulting in the strings "%z", %a" and "%c" that are passed to called function.</p>
<p dir="auto">Who can I achieve that values of macros are passed to the function?</p>
<p dir="auto">Best regards</p>
<p dir="auto">Goerg</p>
]]></description><link>https://forum.netxms.org/topic/7809/using-scripts-in-action-messagetext</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:21:23 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7809.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Nov 2023 14:18:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using Scripts in Action Messagetext on Thu, 09 Nov 2023 15:50:01 GMT]]></title><description><![CDATA[<p dir="auto">It's a bug, was fixed couple of days ago, if there will be another patch release for 4.4, fix will be there, otherwise it will be in 5.0 which should be out in December</p>
]]></description><link>https://forum.netxms.org/post/32972</link><guid isPermaLink="true">https://forum.netxms.org/post/32972</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 09 Nov 2023 15:50:01 GMT</pubDate></item><item><title><![CDATA[Reply to Using Scripts in Action Messagetext on Thu, 09 Nov 2023 14:29:50 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the info. That helps me very much, concerning data I want to access within action message text!</p>
<p dir="auto">But I got an other problem that I don't what goes wrong.</p>
<p dir="auto">In message text I am calling a function this way %[NMSRV::test/testfkt1("p1","p2","p3","p4")] for test this is a very simple function with this definition in NMSRV::test :</p>
<p dir="auto">function testfkt1(pm1,pm2,pm3,pm4)<br />
 { retval = "Param1: "..pm1.." Param2:"..pm2.." Param3:"..pm3.." Param4:"..pm4;<br />
  return (retval);<br />
 }</p>
<p dir="auto">The resulting message differs from expected result. Generated value from this function is:</p>
<p dir="auto"><strong>Param1:  Param2:p1 Param3:p2 Param4:p3</strong></p>
<p dir="auto">It seems, that there is a shift of parameters when script is called from message text. I tested it with two different installations of NetXMS Version 4.4.3.</p>
<p dir="auto">Best regards</p>
<p dir="auto">Georg</p>
]]></description><link>https://forum.netxms.org/post/32970</link><guid isPermaLink="true">https://forum.netxms.org/post/32970</guid><dc:creator><![CDATA[gkaudewitz]]></dc:creator><pubDate>Thu, 09 Nov 2023 14:29:50 GMT</pubDate></item><item><title><![CDATA[Reply to Using Scripts in Action Messagetext on Wed, 08 Nov 2023 15:14:12 GMT]]></title><description><![CDATA[<p dir="auto">Nested custom attributes are not supported. But you can get all the data you need within the script, either by using object attributes, e.g.</p>
<p dir="auto">$node-&gt;ipAddr</p>
<p dir="auto">or by calling expandString method of <a href="https://www.netxms.org/documentation/nxsl-latest/#class-netobj" rel="nofollow ugc">NetObj</a>, <a href="https://www.netxms.org/documentation/nxsl-latest/#class-event" rel="nofollow ugc">Event</a> or <a href="https://www.netxms.org/documentation/nxsl-latest/#class-alarm" rel="nofollow ugc">Alarm</a> , e.g.:</p>
<pre><code>$node-&gt;expandString("%n")
</code></pre>
]]></description><link>https://forum.netxms.org/post/32967</link><guid isPermaLink="true">https://forum.netxms.org/post/32967</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Wed, 08 Nov 2023 15:14:12 GMT</pubDate></item></channel></rss>