Script To Work With Global Variables

From Observer GigaFlow Support | VIAVI Solutions Inc.
Revision as of 10:15, 5 May 2022 by Kevin Wilkie (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Global variables in the event scripting engine allow you to share variables across systems

Get a global, if not available use the default provided and add save that for future use.

actions.getEventGlobal(String key,String adefault)

Create a global variable (this will overwrite any existing value)

actions.setEventGlobal(String key,String value)

Remove a global variable

actions.removeEventGlobal(String key)

Example script function will output the existing global if available, otherwise c:\temp\vpcfolder99

log.warn(actions.getEventGlobal("vpcfolder","c:\temp\vpcfolder99"));