8.18/6/2018

Create a Global Condition

To add a global condition:

  1. Choose Home | Document | Condition.

  2. In the Condition properties dialog box, click Identification and enter a name for the global condition.

  3. In the Condition properties dialog box, click Condition and select the type of condition from the Condition type box.

    Options specific to that type of condition appear below the box. Adjust these options as necessary to define the condition.

    Invert the condition: Invert the value of the condition. If the condition evaluates to True, its final value is False. If the condition evaluates to False, its final value is True.


    Text-Based

    A text-based condition tests whether a string exists in a defined region of the data page, or compares a string with one found at a specific location in the data page.

    String to find: Enter the text string you want to test for on the data page. Note that if you leave this box empty, select an operator that requires a data selection, and use the Data Selector to create the data selection for that operator, PlanetPress Design enters the first line of the data selection you create in this box.

    Operator: Select a location or comparison operator. Location operators look for the specified string in a specific area of the data page. Comparison operators compare the specified string with the one that starts at a specific line and column in the data page, and are intended for comparing one number to another. Comparison operators work by comparing the ASCII values of the two strings, proceeding character by character until a comparison yields an answer for the selected operator. For example, consider the case where the operator is Greater than, the string to find is 1348 and the string on the data page is 1506. The comparison operator first compares “1” to “1”; since it cannot determine from this comparison which is greater, it must proceed to a comparison of the next two characters, “3” and “5”. This comparison permits it to determine which is greater thus it does not proceed with further comparisons of the string. If you select a location operator, for all except On page, you must specify the appropriate data page coordinates in the boxes that appear. If you select a comparison operator, you must specify the line and column numbers that start the string you want to compare with the specified string.

    On value change

    The result of the On value change condition is based not on the data value itself, but on whether the data has changed from one data page to another.

    The On value change condition has two parameters:

    • As with all other conditions, the first parameter is mandatory and it represents the data region to monitor. Depending on the emulation, the selection can be a block of data, a single field or an advanced PlanetPress Talk statement.
      • All Text/PDF emulations: Allow the selection of a block of data.
      • XML/Database: Allow the selection of a single field.
      • Any emulation: Allow any valid PlanetPress Talk expression.
    • The second parameter allows the user to specify an existing condition or a PlanetPress Talk expression that controls whether the On value change condition should be evaluated or not. This option is useful, for instance, to monitor the contents of an Address block, but only when the string “Page 1 of” is found on the data page as well (otherwise, the address block would be considered as “changed” on datapage 2 if it is not repeated in the data stream).

    Page based

    A page-based global condition compares the page number of the current data page with a page number you define, or compares the position of the data page in a set sequence of data pages with a page position you define.

    Type of test: Select the type of test you want the condition to perform. There are five types of tests: On page, Less than, Greater than, Less than or equal to, Greater than or equal to. For example, if you know the first data page is always a banner page, you might want to suppress printing it by creating a condition to test for a page number equal to 1 (an On page test) and associating that condition with the first page of the document. Or, you might want to insert a separator page before the first page of every sequence of 9 data pages. In this case, you create a condition to test for the data page being the first in a sequence of 9, and then create a separator page that prints only if the condition is True.

    Page number: Enter the page number or use the spin buttons to adjust the value. This is either the page number of the data page, or the position of the data page within a set sequence of data pages. In the latter case, you select Of, and use Sequence to define the number of pages in the sequence.

    Of: Select to indicate the test is on a sequence of data pages.

    Sequence: Enter the number of data pages in the sequence, or use the spin buttons to adjust the value.

    Advanced

    An advanced global condition is a condition that you define using PlanetPress Talk expressions. You can include existing global conditions in an advanced condition.

    Advanced condition: Enter the PlanetPress Talk expression that defines the test you want the condition to perform.

  4. In the Override mode box, select how you want PlanetPress Design to evaluate the condition during the design phase.

    Data: Select to have the value of the condition depend on the contents of the sample data file. This in effect removes any override, and results in the condition behaving as it will at runtime.

    True: Select to have the value of the condition always equal to True.

    False: Select to have the value of the condition always equal to False.

  5. If necessary, add PlanetPress Talk code to the object.

    • In the Condition properties dialog box, click PlanetPress Talk before to enter PlanetPress Talk code that you want the document to execute just before it evaluates the condition, or click PlanetPress Talk after to enter PlanetPress Talk code that you want the document to execute just after it evaluates the condition.

  6. Click OK.