Welcome To Support Community

Pipeline Pilot

Advanced Search
Ask Search:
XQWXQW 

Define or change a global variable in protocol using JavaScript

Hi, I want to use JavaScript component to define a global variable in protocol.
We can define global variable in PilotScript using syntax: @variable := "blabla";

I want to know how do I do the same thing using JavaScript? Or change the value of global variable in JavaScript?
Does anyone know the syntax of doing so?

Note: I am trying to get the selected value from a list box, which is bind to JavaScript function by onClick. I want to pass the selected value to another protocol, so I am thinking about assign it to a global variable in JavaScript. And then pass this global variable to another protocol

Thanks for any help and suggestion~!
adornfordadornford
Just use the Parameter to Map parameter on the List Box component. The value from the List Box component will then get passed to the next form protocol with whatever global that you named in Parameter to Map.

E.g. if you set "Parameter to Map" as param, and the List Box had a value "potato", then in the next form protocol you'd have a global @param with a value "potato".