DEFAULT
The DEFAULT attribute assigns a default value to a field during data entry.
field-tag is the field tag that you declared in the SCREEN section.
Default values have no effect when you execute the INPUT statement using the
WITHOUT DEFAULTS option. In this case, INFORMIX-4GL displays the values in the
program variables list on the screen. The situation is the same for the INPUT
ARRAY statement, except that INFORMIX-4GL displays the default values when the
user inserts a new row.
If the field is FORMONLY, you must also specify a data type when you assign
the DEFAULT attribute to a field.
If both the DEFAULT attribute and the REQUIRED attribute are assigned to the
same field, then the REQUIRED attribute is ignored.
If you do not use the WITHOUT NULL INPUT option in the DATABASE section, all
fields default to NULL values unless you use the DEFAULT attribute. If you use
the WITHOUT NULL INPUT option in the DATABASE section and you do not use the
DEFAULT attribute, then character fields default to blanks, number and INTERVAL
fields to 0, and MONEY fields to $0.00. The default DATE value is 12/31/1899. The
default DATETIME value is 1899-12-31 23:59:59.99999.
You cannot assign the DEFAULT attribute to fields of data type TEXT or BYTE.
Related Attributes