Creating Global Variables Programmatically


#1

Is there a way to create global variables from within a piston in webcore. I know the general way is to create global variables from the webcore ide at the top right of the screen. But, if there were some way within a piston or another way to create global variables programmatically, that would be very helpful.

Does anyone know if this is possible or not? And if so, how can this be done?

Thx


#2

As far as I know it cannot be done that way, have to define them manually for use, even locals.


#3

What is it you want to do? I can’t think of a reason you would want to create a global variable on the fly. If there is someth8ng that you want available across multiple pistons, you should know what it is and be able to create ahead of time. Just the value should change dynamically.


#4

This need would be more related to initializing a new environment with all my same pistons and hence global variables (which could number upwards of 100 or more). And it could be helpful if a restore were to be needed. Either way, this could be something very helpful in certain circumstances. It does not appear to be able to be done but I wanted to see if I might be overlooking something or if some new functionality that allowed this might be coming soon.