Language Reference Guide : System Classes : FieldObject Class : DefaultValue Attribute
 
Share this page          
DefaultValue Attribute
Data Type: smallint
4GL Access: RW1
The DefaultValue attribute specifies the default value of the variable associated with the field.
This attribute determines how OpenROAD sets the field's initial value when the frame is run. Valid values are:
DV_SYSTEM
Specifies the system default for the data type.
The OpenROAD system defaults are null if the field is nullable, zero for numeric non-nullable types, and blank for character non-nullable types. For an enumerated field, the default is the first value in its ValueList. If the data type is a system class, this setting automatically allocates an object of the type associated with the class.
DV_NULL
Behaves like DV_SYSTEM, except that the system does not automatically allocate an object for class data types. Instead, it sets the associated reference variable to null.
DV_STRING
Directs OpenROAD to convert the value stored in the DefaultString attribute to the correct data type and assign that value to the field.
You cannot use DV_STRING if the data type is a class name or blank.
Default: DV_SYSTEM
Descriptions of system constant values and their numeric equivalents are listed in DefaultValue Settings.