Field format and case overview

Formats can be applied to fields to change how the value is presented in the
Contract Express
generated document
. A format can be applied in two ways. Either as an attribute of the variable which results in the format being applied to all instances of a variable, or as a local format on an individual field element.
When adding a format to the default format attribute of a variable (to apply to all occurrences) you simply add the format text to the attribute. Refer to Editing variables for details of adding to the default format attribute. When adding a local format to an existing field, you add the
Format
reserved word followed by the
format text.
For local formatting, an expression field takes the general form:
{
expression
Format
format case }
where both the
format
and
case
are optional.
note
1. If both the
format
and
case
are missing then the reserved word
Format
must also be omitted.
2. If the expression is simply a variable and the field does not have any local formatting, then the default format/default case of the variable is applied. This will depend on the Locale settings in Contract Express. The supported Locales are:
Danish (Denmark), Dutch (Netherlands), English (UK), English (USA), French (Canadian), French (France), German (Germany), Spanish (Spain)

The format

The expression field:
{
expression
Format
format
}
is equivalent to the using the expression within a Text Function:
Text
(
expression, format
)
The effect of a format depends upon the datatype of the expression. The following sections describe the formats available to each datatype.

The case

The cases are:
Lower
- all uppercase characters are transformed to lower case characters
Upper
- all lowercase characters are transformed to upper case characters
Capitals -
capitalise the first letter of each word in a text value.
Proper -
capitalise the first letter of each word in a text value and convert all other letters to lowercase.
note
The reserved words, as with all reserved words are not themselves case-sensitive.
The formats when used in fields:
{
expression
Format Lower
}
{
expression
Format Upper
}
{
expression
Format Capitals
}
{
expression
Format Proper
}
{
expression
Format FirstLetter
}
are equivalent to the expressions:
LowerCase
(
expression
)
UpperCase
(
expression
)
CapitalsCase
(
expression
)
ProperCase
(
expression
)
FirstLetterCase
(
expression
)
Examples
{BuyerName Format Upper}
{LowerCase(BuyerName)}
note
Tip: use the Format Editor available from the Default Format area of the Dictionary Editor to test formatting before applying to a field.