Example 1: string condition

In this example, you use the "plus" composite field notation to set up two possible string values for a field. One of the strings will be used if a tag finds a particular search string, the other string will be used if a tag finds any other value (or null).

Start by sweeping out the text to be checked and define a tag named Report containing 'Any text'. Then, on the Searching page of the Field dialog, set the 'Tag string' to Paperless and tick 'Match'.
Define a composite field named Send and enter {+Report='EMAIL','PRINT'} in the 'Value' box.

When a data-record contains Paperless as its value for Report, the value of Send is set to EMAIL.
When a data-record does not contain Paperless as its value for Report, the value of Send is set to PRINT instead.

Example 2: find a graphic

In this example you have a tag (named EndGraphic) which looks for a 'Graphic' on the page. You can test the tag to see if the graphic is present (True) or missing (False) by setting up a composite field (named EndGraphicFound):

EndGraphicFound:={+EndGraphic='T','F'}

You can also just test for 'True' by changing the composite field to:

{+EndGraphic='T',}

Now the composite field EndGraphicFound will be true when the graphic is found and null when the graphic is not found, making the test for the presence of the graphic simple.

Example 3: counter

{+chapter=2,,0}

Initially, composite field is set to the value 0. Each time the field named "chapter" is found, the composite field value is incremented by 1. The field width of 2 means that a leading space will be present until the field value reaches 10.
To have leading zeros use {+chapter=02,,0} instead.

Example 4: splitting a field

In this example, one field is used to define two new fields. The data value of an existing field fullname is:

Constable, John

Use:

lastname:= {fullname:1:','}

to extract the surname (i.e from column1 up to the comma) and

firstname:={fullname:{lastname.length+2}}

to extract the forename (everything after the comma).