The defaultValue property assigns a default value to a field during data entry.

The effect of the defaultValue property depends on the WITHOUT DEFAULTS configuration option of the dialog using the form:

  • With the INPUT statement, form default values have are ignored when using the WITHOUT DEFAULTS option. With this option, the runtime system displays the values in the program variables to the screen. Otherwise, the form default values will be displayed when the dialog starts.
  • With the INPUT ARRAY statement, the form default values are always used for new rows inserted by the user. With INPUT ARRAY, the WITHOUT DEFAULTS option indicates if the existing program array elements have to be used.

Defaults values can also be specified in the database schema file, for formFields defined with database column reference.

If the field is formonly (NON_DATABASE), you must also specify a data type when you assign the default property to a field.

If both the default property and the required property are assigned to the same field, the required property is ignored.

DATETIME and INTERVAL literals are not supported.

The related attribute is simply DEFAULT in Genero BDL. See the DEFAULT attribute topic in the Genero Business Development Language User Guide.