Records dialog events
Reference topic for the records dialog code events set.
Event | Use when ... | Function |
---|---|---|
On Action States Update (Record) |
Use this code event to manage the action state for actions defined for the record, by setting an action as active
( The predefined actions for a record include:
The state of an action is determined by the relation setting (disable Add, disable Modify, disable Delete, disable Search). This event is triggered after the program updates the state of these actions:
|
OnActionStatesChange |
On Fields Activation |
Use this event to set an action that is active only for specific fields when they have the focus. For example, an action to open a zoom form might only apply to a specific field, such as a country field in an address. |
OnFieldsActivation |
Before Display |
Use this event at dialog setup ( This event is triggered at |
BeforeDisplay |
After Display |
Use this event when the user changes mode from display mode to input mode by pressing "New", "Modify", or "Search". You can code to display messages to the user, initialize program variables, and set up the dialog instance; for example by deactivating actions the user is not allowed to execute. This event is triggered in a |
AfterDisplay |
Before Input |
Use this event to display messages to the user, initialize program variables, and set up the dialog instance. You can also use it to detect focus entering or leaving fields controlled by the dialog. This event is triggered at |
BeforeInput |
After Input |
Use this event to implement validation rules (for example, values the user needs to input to
satisfy constraints) for an
INPUT (fields
in a GRID container) dialog instance. Note:
For an This event is called before the default CRUD validation
that the BAM generates for an
INSERT , UPDATE , or
DELETE . This means the event occurs before:
|
AfterInput |
Before Construct |
Use this event to display messages to the user, initialize form fields with default search
criteria values, and set up the |
BeforeConstruct |
After Construct |
Use this event to check if the combination of different fields satisfies the criteria for the
query. Use it to force the end user to enter all that is required in the |
AfterConstruct |
Before Row |
Use this event to find the current row in the
DISPLAY ARRAY , or INPUT
ARRAY dialog:
Use this event to display a message to the user.
Note:
Do not use this event to detect focus entering or
leaving the dialog; use the |
BeforeRow |
After Row |
Use this event to implement validation rules (for example, values the user needs to input to
satisfy constraints) in the
INPUT ARRAY
(fields in a row in a table container) dialog instance. Note:
Use this event also for validation, for example, when
the user deletes a row, or when the user inserts a new row. For an This event is called before the default CRUD validation
that the BAM generates for an
INSERT , UPDATE , or
DELETE . This means the event occurs before:
|
AfterRow |
Before Insert Row |
Use this event to check conditions for the insertion of rows. For example, if the user is not allowed insert rows, the row insertion can be canceled and a message displayed. This event is triggered when a new row is inserted in a dialog. It is called before the new row is created and made the current one. If the condition is known before the insert/append action occurs, disable the insert and/or
append actions to prevent the user from creating new rows, with
|
BeforeInsert |
After Insert Row |
Use this event in check if a database error would occur if a record was inserted in a database table. You can cancel the row insertion at this point. This event may be triggered to cancel the insert row operation. |
AfterInsert |
Before Delete Row |
Use this event to cancel the delete operation if the user is not allowed delete rows in the
database, or if a database error occurs. This event is triggered before a delete row operation in an
|
BeforeDelete |
After Delete Row |
Use this event to display, for example, a message to the user about the current row or the number
of rows left in the array.
Note:
This event is triggered after a delete row operation
in an It is too late to cancel row deletion. INPUT or INPUT ARRAY
dialog instance. It is executed after the Before Delete Row
event and before the After Row event
for the deleted row and the Before Row event
for the new current row. |
AfterDelete |
On Action Append |
Use this event to overwrite a predefined action to append a new row to the end of the
INPUT ARRAY . Note:
Predefined actions are enabled and disabled
automatically by the dialog depending on the
context. For example, when a static array used by
the |
OnActionAppend |
On Action Insert |
Use this event to overwrite a predefined action to insert a new row before current row in an
|
OnActionInsert |
On Action Update |
Use this event to overwrite a predefined action to update a row in an |
OnActionUpdate |