Defining a condition with variables

Variables allow you to use information embedded inside a job, and use this information to define conditions for example for including or excluding jobs. Conditions always consists of a variable, an operator, and a value (this can be a fixed value or another variable).

For example, if you want to sort jobs by the number of pages they contain (more or less than 100 pages), you should define conditions such as "[Number of pages] <= 100" (for the first connection) and "[Number of pages] > 100" (for the second connection).

To define a condition with variables

  1. Select a Connection element.
  2. In the Properties pane, click Include/Exclude jobs and select > Define condition with variables.
  3. Select the sample job for which you want to see the sample values for variables. To be able to see the sample values, you need at least one valid sample job. Refer to Creating a sample job.
  4. Define the condition, starting with the first element (always a variable).
    1. Under Condition, next to the first field at the left, click .
    2. Search for the variable you need. Select a group (from the first column), and a variable belonging to that group (from the second column). In the third column you will find information about the selected variable and (at the bottom) the value of that variable as found in the sample job (if the variable is job-related).
      Note: If the variable is not job-related (like Switch.FlowName), the sample value of the variable will be the same, regardless of which sample job you select.

      For example, the variable "Number of pages" can be found in the group Stats.

      Depending on the selected variable, you may have additional options (displayed at the right), e.g. in case of dates, to define the format of that date.

    3. Click Insert variable. The Text with variables field (below the columns) shows the selected variable.
    4. Click OK.
  5. Now select an operator from the list (next to the selected variable). For example: Equal to, Contains, Matches, ...
  6. To enter a value, click (next to the second field).
    • To enter a fixed value, select Inline value and type the required value in the text field.
    • To enter a variable value, i.e. a variable, select Define single-line text with variables and proceed as explained in step 4.
    The Sample value indicates whether or not the sample job matches the defined condition.

    For example, if the sample job has 20 pages and the condition states that Number of pages > 100 , the value in this field will be "false".

  7. To add more conditions as required, click and define another condition (repeat steps 4-6).
  8. Click OK. The value of the Include/exclude these jobs property is set to Condition with variables defined.