Field_Entry_msg - DataDictionary

Sets the Id of the message to be sent when the cursor enters 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_Entry_msg

Read Access: Get Field_Entry_msg iField to IntegerVariable
Write Access: Set Field_Entry_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 can create 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.

Sample

Set Field_Entry_msg Field Customer.State to EntryCustomerState


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

The Entry Method, a procedure, can be programmed to perform any action. For example, you might use it to display special information or default values each time the cursor goes to the column for data entry.

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

For example, if you have the following member method:

Procedure EntryOrderDate Integer iField Date dDate
    // Add a default date if the column is blank
    Boolean bChanged
    Get Field_Changed_State iField to bChanged

    If (not(bChanged) AND dDate =0) Begin
        SysDate dDate
        Set Field_Default_Value iField to dDate
    End
End_Procedure


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

Set Field_Entry_msg Field Orderhea.Order_Date to EntryOrderDate



Syntax

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

Procedure MethodName Integer iField Type CurrentValue 

Where:



The parameters that are passed to the Entry method allow you to write generalized Entry methods that can be reused in other columns and tables.

See Also

Field_Exit_msg | Field_Validate_msg | Defining Data Dictionary Field Attributes