Procedure Field_Defaults
The Field_Defaults event is provided to support the setting of default values after a clear operation. You may set any column value, which will be reflected in the DEOs and will get saved with the new record.
Because the setting of defaults is coded in a procedure, it allows for complex rules.
The setting of a default is not recognized as a data change by the Data Dictionary; therefore, the setting of defaults will not generate a "data-loss" warning message.
Procedure Field_Defaults Forward Send Field_Defaults Set Field_Changed_Value Field Customer.State to "CA" Set Field_Changed_Value Field Customer.Discount to (Discount(Self)) Set Field_Changed_Value Field Customer.City to "Miami" End_Procedure
Defaults may also be set upon entry of a DEO by creating a Field Entry method and it setting it with the Field_Entry_msg property. That method could set the default value using the Field_Default_Value message.
Defining Data Dictionary Events | Retains and Setting Default Field Values