OnPostFind - DataDictionary
The messages OnPreFind and OnPostFind are sent before a find and after a find, respectively
Type: Event
Parameters
| Parameter | Type | Description |
|---|---|---|
| eMessage | Integer | The Find operation type. Legal values are:ConstantMeaning |
| bFound | Boolean | Was the Find operation successful |
Syntax
Procedure OnPostFind Integer eMessage Boolean bFound
Description
The messages OnPreFind and OnPostFind are sent before a find and after a find, respectively.
Be sure to check not just the bFound parameter, but also the operation type (eMessage). For example, When a clear occurs, the parameter passed indicates a successful clear (a successful find nothing).
Procedure OnPostFind Integer eMessage Boolean bFound
Forward Send OnPostFind eMessage bFound
If (eMessage<> DDFindClear and bFound) Begin
Send doSomethingIfRecordIsFound
End
End_Procedure
The significance of these messages:
-
All Find operations (Request_Find, FindByRowId, Find_By_Recnum, Request_Assign and Clear) are sent to a single place.
-
These are called before or after the actual Find, so the Data Dictionaries are not busy, which means you can send other DD messages within these (no reentrancy issues).
-
These are sent to the DD that owns the finding table. It is possible to send these messages to child objects asking for a parent find. In such a case, these events are sent to the owner (the parent) and not the DD that happened to get the message. You are sure that that DD getting the message is the DD for that table.