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.

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.
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)}

See Also

Conditional spans