Entry Event
The Entry event is triggered when the user enters a field.
This event has the following syntax:
on entry [fieldname]
fieldname is optional if you specify this event in a field script.
The following attributes of the FrameExec class can be used in the Entry event block:
TriggerField
Specifies the field that is being entered
OriginatorField
Specifies the field specified in the initial on entry statement
PreviousField
Specifies the field that last had the input focus
InputFocusField
Specifies that this field is set to null during the Entry event, because the Exit for the previous field is done but the Entry event for the TriggerField is not yet complete
Use the CurFrame system variable to access these attributes. For more information, see
FrameExec Class.
Usage: The Entry event is defined for all scalar fields. This event is not defined for menu fields, shape fields, or composite fields.
Only fields that have a FocusBehavior of FT_TABTO or FT_TAKEFOCUS can receive an Entry event. Because many fields have a default FocusBehavior setting of FT_SETVALUE, they do not automatically receive entry events. If you want them to receive entry events, you must set their FocusBehavior attribute to either FT_TABTO or FT_TAKEFOCUS, as appropriate. (For more information about this attribute and its settings, see
FocusBehavior Attribute.)
The Entry event displays information when the user enters a field. You can display the type of data that can be entered in a field or help messages about choices for an enumerated field. For example, assume that your application has a frame that contains a simple field called message_field and several entry fields, one of which is called name_field. You can write an entry event for each field, so that when the user enters a field, a help message appears in message_field. The following entry event block performs this function for name_field:
on entry name_field =
begin
message_field = 'Enter a valid employee name
here.';
end
Because the Entry event is not defined for composite fields, you cannot use it to detect entries into table field columns. You can use only the ChildEntry event to do this or to do more generic Entry event processing (such as displaying a message for any field that is being entered). For more information about this event, see
ChildEntry Event.
More information: