Hello
I encountered some problems while trying to work with global variables.
Sometimes it happens that when I want to get the value of a variable, it just returns 'undefined' or 'NaN'...
All I did was declaring a global variable (File -> Form properties and also global.xyz = ...; on the initialize event of Document1, I've used both methods) and adding +1 to it when pressing a button.
This would look like:
--------------------------------------------
global.test = 0; (Document initialization)
app.alert(global.test); (Button click event)
global.test++;
--------------------------------------------
The strange thing is: Sometimes I can count up to values greater than 50 before the program "loses" the variable, sometimes it happens already at 10 or below and in other cases it is undefined already when I open the document.
However, I did not change anything in my script.
Is there another way to declare and use global variables?
May it also be possible that these problems are normal when you use the trial version of LiveCycle Designer ES?