4. System Classes : AttributeObject Class : DefaultValue Attribute
 
Share this page                  
DefaultValue Attribute
Data Type: smallint
4GL Access: RW1
The DefaultValue attribute specifies the default value of the user class attribute. The DefaultValue attribute determines how OpenROAD sets the user class attribute's initial value when the user class object is created.
Valid values are:
DV_NULL
Behaves like DV_SYSTEM except that OpenROAD does not automatically allocate an object for system 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.
Note:  You cannot use DV_STRING if the data type is a system class name, user class name, or blank.
DV_SYSTEM
Specifies the system default for the data type. The system defaults are null if the field is nullable, zero for numeric non-nullable types, and blank for character non-nullable types. If the data type is a system class, this setting automatically allocates an object of the type associated with the system class.
Default: DV_SYSTEM
Descriptions of system constant values and their numeric equivalents are listed in DefaultValue Settings (see DefaultValue Settings).