More on defining composite fields

A complicated composite field can be set up in the Value box on the 'Definitions' page of Field dialog, see Defining a composite field. You may key-in the definition directly (see Composite field syntax summary) or click More... to display the Composite field wizard. EscapeE 'eE' iconEscapeE will construct the definition from details set up in the wizard, see below.

Click to expand/collapse this hidden textComposite field wizard

A complex composite field may comprise several conditions. These conditions can be set up, one at a time, in the Composite field wizard then coded and concatenated by EscapeE when the Add button is clicked.

1.Open the wizard by clicking More... on the Definitions page of the Field dialog.
2.Choose one of the Components from the drop-down list of fields already present in the document and Special composite symbols.
3.Set the 'Condition' for the field to be output; choose from:
oAlways
oIf field found – On selection, additional edit boxes are displayed for setting up a String condition.
Either enter a string Value for:
when field is Found, and/or
when field is Not found.

Or set up a Counter, see below.

oIf field changed – On selection, additional edit boxes are displayed for setting up a Page condition.
Either enter a string Value for:
when field is Unchanged, and/or
when field is Changed.

Or set up a Counter, see below.

4.You may extract just part of the Component field's value, rather than the whole field's value. In the 'Extract sub-field' panel:
ospecify the column position of the first character to be extracted in the Starting column box.
Click From start to count columns from the left or
click From end to count columns from the right.
oSet up the place at which to stop extracting characters:
You may specify an Ending column if counting from left, or
Specify width as a Number of columns or
Specify Terminators – any character that may indicate the end of the piece of data, e.g. comma.
oA sub-string may be found within a field: specify the number of the Word.
oA line may be found within a multi-line field: specify the number of the Line.
5.Click Add then repeat steps above to build up the entire composed field definition.
oArithmetic expressions may be inserted in Value as necessary directly from the keyboard: see Composite field expressions.
6.When the composed field definition (shown in 'Value' box) is complete, click Done.
Click to expand/collapse hidden textCounter setup

When Field found or Field changed conditions have been selected, the wizard displays a panel of options. Ticking a Counter check-box on this panel sets up a count of the number of occurrences of the condition.

1.Set up the type of counter by ticking the Counter check-box alongside the appropriate option:
oSearch for the field and increment the count if the field is
Found or
Not found or
oCheck the field and increment the count if the field value is
Changed or
Unchanged.
2.Enter, or use the arrows on the spin-box to set up, the "width" of the counter:
ospecify the minimum number of digits to be used for the counter or
otick 0 check-box to create a fixed-length counter. Specify the number of digits to be used: it will be filled-out using leading zeroes.
3.Enter the number at which the count is to Start.
4.Enter the number at which the count ends and resets in the Limit box.
5.In the Reset box, enter the number at which the count is to restart when the Limit has been reached.

See also Numerical conditions.

To assign a value

To simply assign a constant known value to a new composite field:

1.Select the field name from the drop-down list of Components.
2.Enter the value that the field is to take in the Value box.
3.Click Assignment.
4.Click Done then OK.

See also Defining field values.

Tip:  If you re-open the Field dialog to show the Definitions page for a composite field, its code is shown in the 'Value' box and its evaluated result is shown below its 'Field' name.