Language Reference Guide : 5. Events : ChildValidate Event
 
Share this page                  
ChildValidate Event
The ChildValidate event is triggered for a composite field when a child field receives a Validate event. For a MenuGroup, the ChildValidate event is triggered when one of its menu items receives a Validate event.
This event has the following syntax:
on childvalidate [compositefieldname]
compositefieldname is optional if you specify this event in a field script, or if the composite field is the frame's top form.
The following attributes of the FrameExec class can be used in the ChildValidate event block:
TriggerField
Specifies the field that has been changed
OriginatorField
Specifies the field specified in the initial on childvalidate statement
Use the CurFrame system variable to access these attributes. For more information, see FrameExec Class.
Usage: The ChildValidate event is defined for all composite fields, including the subform that is the frame's top form.
The ChildValidate event provides a way to ensure that valid data is entered in a child field. This event is often used with entry fields to validate the data in the field if the user has changed the existing data or entered new data.
OpenROAD does not trigger the ChildValidate event for an entry field as soon as the user begins typing in the field. Instead, the event is triggered when the user attempts to tab out of the field or clicks another field that has a FocusBehavior setting of FT_TAKEFOCUS, FT_TABTO, or FT_SETVALUE.
More information:
OriginatorField Attribute
TriggerField Attribute