Application Global Variables - Web Project Properties

Description

The Web Project Properties dialog now has a new section called Application Global Variables where you can define global variables that can be seen by all .a5w pages and components in an application. The variables you define here are inside the AppVar variable frame/namespace. For example, say that you defined an Application Global Variable called var1 and set its value to "Alpha". Here is how you would reference this value in your code:

if AppVar.var1 = "Alpha" then
    'do something
end if
You can not persistently modify the value of an Application Global Variable in your code. On the next page request, the Application Global Variable will revert to its original value.

The Application Global Variables you specify are defined for the application in the a5_application.a5i file that gets automatically published when you publish any page or component. Contrast Application Global Variables with Application Variables, which can be defined when you define a Web Publishing Profile. The Application Variables you define in a Profile are specific to that particular profile.