Try OpenEdge Now
skip to main content
ABL Reference
Handle-based Object Events Reference : FILL events
 

FILL events

There are two levels of FILL events: the first level is for a ProDataSet object or one of its member buffer objects; the second level is for individual records created in each temp-table.
The following table lists the first-level FILL events.
Table 126. First-level FILL events
Event
Affected objects
AVM action
AFTER-FILL
Buffer object of a DATASET temp-table, ProDataSet object
This event occurs at the very end of a FILL, and can be used to adjust the contents of the ProDataSet object or Buffer object, reject the FILL operation, or disconnect from a server or database. For a child table, the event occurs once for each parent record that is created.
BEFORE-FILL
Buffer object of a DATASET temp-table, ProDataSet object
This event occurs at the very beginning of a FILL, before anything is read or created.
For a Buffer object, this event allows the developer to do preparatory work for an individual table. For the parent table in a set of related tables, where the FILL event is applied to this top-level table, it could be the same kind of connection code as for the ProDataSet object as a whole. For a child table, the event occurs once for each parent record that is created, and allows the developer to adjust the query for the child table, or cancel the FILL for that parent altogether.
For a ProDataSet object, this event allows the developer to make a server or database connection, or do other preparatory work. Alternatively, it allows the developer to intercept and fully replace the default behavior.
The following table lists the second-level FILL events. These events occur once immediately before or after each record is created in a temp-table during a FILL.
Table 127. Second-level FILL events
Event
Affected objects
AVM action
AFTER-ROW-FILL
Buffer object of a DATASET temp-table
This event occurs after a record is created in the temp-table. The procedure can, for example, modify field values in the record by supplying values for calculated fields, or perform filtering and reject a record by deleting it. The procedure cannot modify record currency using the ProDataSet object buffers in any other way. It can use separately defined buffers to modify the ProDataSet object in other ways. The procedure can RETURN ERROR to abort the entire FILL, or RETURN NO-APPLY to cancel the cascading of the FILL to child buffers, if any.
BEFORE-ROW-FILL
Buffer object of a DATASET temp-table
This event occurs before a record is created in the temp-table, but after the data source record(s) for it are read. For example, this procedure could examine the database buffers or other information and decide not to create the record, using a RETURN NO-APPLY statement.