Monday 17 October 2011

Post-QueryPre-Query (DifferenceUsage)

Pre-Query
Fires during Execute Query or Count Query processing, just before Form Builder constructs and issues the SELECT statement to identify rows that match the query criteria.
Use a Pre-Query trigger to modify the example record that determines which rows will be identified by the query.
Post-Query
When a query is open in the block, the Post-Query trigger fires each time Form Builder fetches a record into a block. The trigger fires once for each record placed on the block's list of records.
Use a Post-Query trigger to perform the following tasks:

? Populate control items or items in other blocks

? Calculate statistics about the records retrieved by a query

? Calculate a running total

When you use a Post-Query trigger to SELECT non-base table values into control items, Form Builder marks each record as CHANGED, and so fires the When-Validate-Item trigger by default.
You can avoid the execution of the When-Validate-Item trigger by explicitly setting the Status property of each record to QUERY in the Post-Query trigger. To set record status programmatically use SET_RECORD_PROPERTY.

No comments:

Post a Comment