Conditions

Conditions let you apply decision making to values and text blocks included in generated output. Conditions may be set up in advance in order for them to be made available when designing templates. Facilities in the template Designer make it possible to specify conditions specific to the template as well.

The DSD’s available conditions are shown in a panel to the right of the DSD Hub. Double click each to edit it or click Add New to create a new one. In both cases the Conditions dialogue will open.

fData_ConditionEach condition needs a unique id, by which it will be referred to in the template Designer. The description should briefly describe the condition so that Designer users can select the correct condition tag.

The notes entry is useful to explain the condition more fully.

The condition consists of two values and an operator. The values are either Global Placeholders, User Entries, values from any data group, or variables relating to data groups (either the number of records in the data group or whether the data group has any records at all).

The format option ensures that the condition is compared in the correct way. For example 19<2 is true for a text comparison but false for a number comparison.

So you can set up many different conditions, such as:

  • Compare two fields in a data group
  • Compare two values in different data groups
  • Compare a data group value with an entered value
  • Compare a user entry with a value from a data group
  • Check if a data group has more than one record
  • Check if a data group has any data

 

These conditions can then be used in templates to include different sections of the template based on the condition.

Conditions can be used in a template either individually, or within a condition block when each is evaluated in turn and only the first to evaluate to true is used (an “else” option can also be added to a block).

image_pdfimage_print