7.4

Table Of Contents
Conditions
This chapter explains conditions, variables, and PlanetPress Talk and how to use these features in your document.
Conditions
What is a condition?
A condition is a PlanetPress Talk expression that performs a test on the data page and resolves to either True or False. The
condition may be as simple or as complex as you require. You use conditions to make the display of a page, object, group, or
line of data in a data selection object dependent on input data. The page, object, group, or line of data in a data selection
object displays only if the condition resolves to True.
Conditions can be used to create OMR, by creating black lines of the size and locations specified in your OMR requirement spec-
ifications, and by applying correct conditions to these lines (such as "first page", parity checks and page numbering).
There are three kinds of conditions: global conditions, local conditions, and line conditions. You can associate at most one
global or local condition at a time with a page, object, or group. A line condition is internal to a data selection object. You can
associate a global or local condition with a data selection object, regardless of whether that data selection object uses a line
condition. The global or local condition you set determines whether the data selection object will display. The line condition
alters what the object displays. Note that global conditions are the only ones that appear in the Structure area, and are the
only ones available for use with any of the pages, objects, or groups in the document.
It is important to understand the order in which the document processes conditions when it executes. At runtime, the doc-
ument evaluates global conditions before it executes a data page. It evaluates local conditions and line conditions as it
executes the pages or objects with which they are associated.
Global Conditions
What is a global condition?
A global condition is a condition that is available for re-use throughout the document. Global conditions are the only type of con-
ditions that appear in the Structure area, and that are thus available for re-use by other elements in the document.
You create global conditions for conditions you expect to use more than once in the document. For example, consider a form
letter that includes a few pages of information relevant only for residents of Kyoto. You create a global condition to test for the
presence of Kyoto in the client address in the data page, and associate the condition with each of the relevant pages.
Local Conditions
What is a local condition?
A local condition is one that you associate with a particular page, object, or group. It is not available to any other page, object,
or group in the document, and appears only within the element in which you define it; it does not appear in the Structure area.
You cannot re-use or combine a local condition.
You can use global conditions as variables in a local condition.
Line Conditions
What is a line condition?
Conditions
©2010 Objectif Lune Inc - 187 -