Field_Exit_msg - DataDictionary

Sets the Id of the message to be sent when the cursor exits a table column

Type: Property

Access: Read/Write

Data Type: Integer

Parameters: Integer iField

ParameterDescription
iFieldNumber of the column in the table


Syntax
 Property Integer Field_Exit_msg

Read Access: Get Field_Exit_msg iField to IntegerVariable
Write Access: Set Field_Exit_msg iField to IntegerVariable/Value


Description

The Field_Entry_msg and Field_Exit_msg properties are similar to the Field_Validate_msg and are sent whenever the cursor enters or exits an item connected to a database column. You would create the methods and then assign the method names to the field properties.

Web Applications

Field_Entry_Msg and Field_Exit_msg do not fire in web applications using the Web Framework, because OnFocus and OnBlur are asynchronous operations, which cannot be cancelled.


While returning a non-zero would stop the navigation event, using the entry method event to control navigation is strongly discouraged. These methods should be used only to handle pre-entry or post-exit processing.

Set Field_Exit_msg Field Customer.Zip to ExitAdjustZip


Field_Exit_msg allows you to specify the name of a method that is executed whenever the cursor moves out of a data-entry form connected to the column.

The Exit Method, a method, can be programmed to perform any action. For example, you might use it to adjust the values of some calculated data that is dependent on the column value being entered.

The Exit Method should be a member method of the table's Data Dictionary class.

For example if you have the following member method:

Procedure AdjustDisplayTotal Integer iField Integer iValue
    // This updates the extended price column, which will update any 
    // display balances. This is only done for display purposes. The
    // actual amount is updated to the column during the save.
    Integer iQty
    Number nAmnt

    Get Field_Current_Value Field Orderdtl.Qty_Ordered to iQty
    Get Field_Current_Value Field Orderdtl.Price to nAmnt
    Set Field_Current_Value Field Orderdtl.Extended_Price to (nAmnt *iQty)
    // note we set value, but not changed state!
End_Procedure


To use this method on the appropriate column of a table, you would set the column's Entry Method to AdjustDisplayTotal. You are actually assigning the method handle msg_AdjustDisplayTotal but the "msg" prefix, if omitted, will be supplied automatically.

Set Field_Exit_msg Field Orderdtl.Qty_Ordered to Adjust_Display_Total



Syntax

The declaration prototype for an exit method takes the following general form:

Procedure MethodName Integer iField Type CurrentValue

Where:



The parameters that are passed to the exit method allow you to write generalized procedures that can be re-used in other columns and tables.

See Also

Field_Entry_msg | Field_Validate_msg | | Defining Data Dictionary Field Attributes