New Function(s) in 8 - SetVar() and GetVar(), set and read named global variables (Ver 184.108.40.2066)
These two functions have been partly implemented for a while, but due to structural changes in PRISM we had to disable them in release. These changes have now been made and they are free to use.
It is more than 30 years since DataEase 1.0 was released and in all this time there has never been a proper official way of transferring global variables in DataEase. There have been several CDFs and the people in the know knew that you could use a SQL return value variable, but in reality for most users there was no proper way.
Even if you used the CDFs you would have to use numbers in an array, and if you are like me you very quickly lost track and starting reusing the same number causing havoc in you application...
This has now all changed, with SetVar() and GetVar() you can set and read as many aptly named global variables as you heart desires.
Returns: Empty string so it can be called from any derivation without impacting result.
Value (String): If using constant it will need to be string ,but will convert correctly from any field or function value to string (Not like SetArray()...)
Returns: Value of "MyGlobalVariableName". Can be used in any field type and will convert result correctly to that field type...again not like GetArray()....
If you want to persist using SetArray() and GetArray() you will find ToText() useful as it will correctly convert any value to Text same way as SetVarl().