Variable task properties

When you edit tasks, you may notice that some of the properties that you can modify have a red (or more precisely, a maroon) title. This means that the property can be dynamically determined whenever your process runs, that is to say it will not remain static. This can be extremely useful when, for example, you want to determine how many copies you will print out depending on your data, or what document will be used in the printout depending on the department it came from.

Variable properties may include:

Variable properties can also be used in these special locations:

  • In the Set Job Infos and Variables Action Task. See Set Job Infos and Variables.
  • In Scripts. See the chapter on Using Scripts.
  • In the Create File Input Task. See Create File.
  • Within a PlanetPress Design Document, using the ExpandString() function. See the PlanetPress Design User Guide and PlanetPress Talk Reference Guide.

Variable properties can also be mixed, meaning you can combine, within a single variable property box, any number and order of variable types. You can, for example, do the following for an output file name: %O_@(1,1,1,30, KeepCase,Trim)_%y-%m-%d.txt. This would translate in the original file name, followed by part of the first line of a text data file, then the current date.

Inserting variables in task properties

In any variable properties box, you may use the contextual (right-click) menu to add variables and control characters, as well as to get data and make data selections. The lower part of the contextual menu is divided into 4 items that provide variable properties:

  • Variables
    • System: Contains standard system variables, see System variables.
    • Job Info: Contains Job Info variables from %1 to %9
    • Local Variables: Contains a list of local variables in this process. If no local variables exist, this item is disabled.
    • Global Variables: Contains a list of global variables in this configuration. If no global variables exist, this item is disabled.
  • Control Characters: Contains a list of control characters that can be used in printers.
  • Get Data Value: Brings up the Data Selector, retrieves the value you select and places it in the variable properties box. This information becomes static and does not change between each datapage and job file.
  • Get Data Location: Brings up the Data Selector and records your selection. The data selection is dynamic, meaning it will get the data located in the area you choose, every time a new data file passes through it. This is indicated by a data selection (see Data selections).
  • Get Metadata Value: Brings up the Data Selector with only the Metadata tab visible and lets you select the value (contents) of a Metadata attribute or field. The result is static and does not change between jobs.
  • Get Metadata Location: Brings up the Data Selector with only the Metadata tab visible and lets you select the location of the data. The result is variable and changes between jobs.
  • Get Repository Value: Brings up the Data Repository Manager dialog to select the value (contents) of a specific key. The result of the lookup is static.
  • Get Repository Location: Brings up the Data Repository Manager dialog to select the location of the key to lookup every time this task is executed.

You can quickly identify variable information that is already present in your variable properties as such:

  • A percentage sign identifies system variables, as well as standard and custom job info variables — %f, for example.
  • A backslash indicates a control character — \004, for example.
  • An at sign (@) indicates a data selection for emulations other than database — @(1,1,1,1,17,KeepCase,Trim), for example.
  • Field indicates a data selection for a database emulation — field(1,0,0,'Billing_Email',KeepCase,NoTrim), for example.
  • The lookup() function indicates a lookup in the Data Repository Manager.