NetXMS Support Forum

English Support => General Support => Topic started by: Tursiops on June 12, 2017, 03:59:59 PM

Title: Passing parameters to Script via Object Tools
Post by: Tursiops on June 12, 2017, 03:59:59 PM
Hi,

I was wondering if it's possible to pass parameters to a "Server Script" called via Object Tools (and reference them inside the actual script).
I know I can pass an input field as %(inputfield), but while I can make this work with an Agent Command, I seem to have trouble with Server Script types. Has anyone done this and give me some pointers?

Thanks
Title: Re: Passing parameters to Script via Object Tools
Post by: Tursiops on June 12, 2017, 04:11:20 PM
Well, ignore me. Looks like I hit a bit of caching that caused me grief here.
It's still the same principle as with Agent Commands.
<script> %(inputfield1) %(inputfield2) ...
and reference as $1, $2, etc. inside the script.

All works. :)