7.6

Table Of Contents
The scope of a variable is the context in which it is available. A variable may be available only to a specific object (a local var-
iable), or available wherever you can enter a PlanetPress Talk expression (a system variable or a global variable). You can
enter a PlanetPress Talk expression in the PlanetPress Talk properties of any object or page, the PlanetPress Talk properties
of the Document properties dialog box, or in any text box that accepts PlanetPress Talk code (by default these text boxes have
a maroon label).
You can define, set and delete both local and global variables in PlanetPress Design. You cannot define or delete system var-
iables, and, with a few exceptions, neither can you set system variables. Consult the PlanetPress Talk Language Ref-
erence for more precise definitions of system, global, and local variables.
Common Uses of Variables
The following are several common uses for variables:
l Store values that you want to reference at various places in the document.
l Concatenate strings For example, you want to create a footer for each page of a patient record document that con-
tains the patient’s name, physicians name, file number, and date the record was last updated. All the pieces of infor-
mation are available in the input data.
l Perform calculations For example, the input data for your financial statement document does not include a figure
for year-to-date earnings, but does include earnings per month.
l Create counters For example, the input data for your invoice document contains a variable number of line items for
each invoice.
System Variable Example
The system variable &current.datapage contains the page number of the data page the document is currently processing. The
type of this variable is integer; it always contains an integer value. It is a system variable and thus is automatically initialized
and set in PlanetPress Design, and available anywhere you can enter a PlanetPress Talk expression. Consult the Plan-
etPress Talk Language Reference for more information on this and other system variables in the &current system
object.
Global Variables
You can insert global variables of type string, measure, integer, and currency in the Text properties of a text object. A sub-
menu of variable types appears when you choose Variables | Global Variables, or right-click at the point at which you
want to insert the variable and choose Global Variables, or in the Variables toolbar, click Global Variables. You use this
submenu to select the global variable you want to insert.
If you reference a global variable in a text object and subsequently change the type of the global variable to one not supported
by the text object, PlanetPress Design replaces the global variable in the text object with a blank space.
PlanetPress Supports Global Variables in the Global Function Library Manager
To view global variables in the Global Function Library Manager:
l In the PlanetPress main menu, choose Tools | Application | Global Function Library Manager.
In the Global functions in the current document column, global variables are sorted first followed by global functions in alpha-
betical order. For each global variable, the Global Function Library Manager contains variable names, data types, and default
values. In the Libraries column, libraries are listed in alphabetical order.
Create a Global Condition
To add a global condition:
Conditions
©2010 Objectif Lune Inc - 188 -