I’m trying to set and use a global variable, but it’s not working.
If I place:
[pre]$myglobal = “Hello”;
sc_set_global($myglobal);
[/pre]
in onApplicationInit() or onScriptInit()
and
[pre]sc_alert([myglobal]);[/pre]
in onRecord(), the value [myglobal] isn’t available in onRecord(). When started, the application shows only a textbox labeled ‘myglobal’ to input a value.
If I place:
[myglobal] = “Hello”;
in onApplicationInit() or onScriptInit() with no other events defined, I get the same result when starting the application.
I’m using a grid application to test this if it makes any difference.
What am I missing?