Declaring instance variables

Often, data needs to be accessible in several scripts within a window. For example, assume a window displays information about one customer. You might want several CommandButtons to manipulate the data, and the script for each button needs to know the customer’s ID. There are several ways to accomplish this:

When declaring variables, you need to consider what the scope of the variable is. If the variable is meaningful only within a window, declare it as a window-level variable, generally an instance variable. If the variable is meaningful throughout the entire application, make it a global variable.

For a complete description of the types of variables and how to declare them, see the PowerScript Reference.