Ordinary Constant values use the syntax shown below:
| Field Type | Syntax | Examples |
|---|---|---|
| Boolean |
The identifiers listed in the examples. |
TRUE Yes FALSE No |
| Character |
Use single ' or " as the delimiter for the start and end of the string. You cannot include the delimiter in the string. If you want to initialise a multi-occurs character field such as an address with a constant value you will need to use a string that is carefully constructed. See below for details. |
'ABC 123' "Hello World" |
| Date |
Use the day.month.year format (not your preferred format), where
day, month and year are numbers. The Year should be between 100 and
9999, if the year is below 100 1900 is added. |
8.1.1999 (8th Jan 1999) 02.07.63 (2nd July 1963) 1.1.2000 (1st Jan 2000) 20.3.1 (20th Mar 1901) |
| Numeric |
A numeric constant uses the following syntax Optional -, 1 or more digits including an optional decimal point. |
1 99999.99 -7.5 |
| Time |
Use the hours:minute:second:hundredth format, where all four
parts are two digit constants. |
12:14:56:99 |
For types other than character you can use a number of constants separated by the concatenation operator to assign to a multi-occurs field. For example a multi-occurs numeric field could be intialised like this: 1 |2 | 3
Null values are denoted using the following identifiers:
| Field Type | Null Name |
|---|---|
| Character | null_char |
| Date | null_date |
| Numeric | null_number |
| Time | null_time |
If you want to test for a NULL value, you usually only need
expression = NULL or
expression <> NULL
irrespective of data type.
There is no null value for Boolean fields.
Take care to assign all the values of an occurs field. If you assign fewer occurs than the field has, then it is padded with the last value specified
To intialise the contents of a multi-occurs character field using a constant, consider the field as one long character field including all the occurrences next to each other. For example, to assign a multi-occurs field ADDRESS of type C20*4, consider it as a field of length 80. Address each character according to its position within the character string(an X shows the start of each occurrence):
X1234567890123456789 |
X1234567890123456789 |
X1234567890123456789 |
X1234567890123456789 |
" |
The trailing spaces can be omitted if you like. You may find it easier to initialise each occurrence separately, and this will be necessary if the field is bigger than the maximum size of a formula.