Using Scripts in Action Messagetext
-
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.
The problem I want to solve is:
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.Who can I achieve that values of macros are passed to the function?
Best regards
Goerg
-
-
Thanks for the info. That helps me very much, concerning data I want to access within action message text!
But I got an other problem that I don't what goes wrong.
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 :
function testfkt1(pm1,pm2,pm3,pm4)
{ retval = "Param1: "..pm1.." Param2:"..pm2.." Param3:"..pm3.." Param4:"..pm4;
return (retval);
}The resulting message differs from expected result. Generated value from this function is:
Param1: Param2:p1 Param3:p2 Param4:p3
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.
Best regards
Georg
-
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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login