NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: Linking to Script Library Scripts  (Read 168 times)

Staj

  • Newbie
  • *
  • Posts: 35
    • View Profile
Linking to Script Library Scripts
« on: January 04, 2019, 10:12:09 am »

It would be good if Event Processing Filtering Scripts, DCI Transformation Scripts etc. could be linked to scripts in the Script Library (not imported from Script Library, although that could be good too).
Not only would this allow for rapid reuse in a centralised manner, it would allow for easier change management if a script snippet is reused in many places. Currently, changing a calculation in a script snippet that's used by lots of DCI Transformation scripts across multiple objects would mean you have to go into each one and change it, if it was linked to a script in the Script Library, it would only need to be changed once.
Logged

Tursiops

  • Sr. Member
  • ****
  • Posts: 342
    • View Profile
Re: Linking to Script Library Scripts
« Reply #1 on: January 17, 2019, 11:14:50 am »

Hm, for all I knowyou can import a script from the script library.
Code: [Select]
use <scriptname>;You can then call a function that's been defined in that script, e.g.
Code: [Select]
return functionName(param1,param2);We're using that for auto-bind rules (admittedly not for Transformations and Event Processing Filtering, we haven't had a need to try that yet).
Logged