EscapeE

Composite fields

Composite fields

Previous topic Next topic No expanding text in this topic  

Composite fields

Previous topic Next topic JavaScript is required for expanding text  

Example 1: string condition

{+Status='Mrs. ','Ms. '}

Results in either "Mrs " if Status field was found or "Ms " if it was not found.

Example 2: 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 3: 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).


Links

String conditions

Numerical conditions

Special fields in composed strings

Composite field expressions

Partial fields