Tuesday, July 7, 2009

OTHERS


1. When-New-Record-Instance/When-Validate-Record

When-New-Record-Instance
Perform an action immediately after the input focus moves to an item in a different record. If the new record is in a different block, fires after the When-New-Block-Instance trigger, but before the When-New-Item-Instance trigger.
Specifically, it fires after navigation to an item in a record, when Form Builder is ready to accept input in a record that is different than the record that previously had input focus.
Use a When-New-Record-Instance trigger to perform an action every time
Form Builder instantiates a new record. For example, when an operator presses [Down] to scroll through a set of records, Form Builder fires this trigger each time the input focus moves to the next record, in other words, each time Form Builder instantiates a new record in the block.
When-Validate-Record
It Augments default validation of a record. Fires during the Validate the Record process. Specifically, it fires as the last part of record validation for records with the New or Changed validation status.
Use a When-Validate-Record trigger to supplement Form Builder default record validation processing.
Note that it is possible to write a When-Validate-Record trigger that changes the value of an item in the record that Form Builder is validating. If validation succeeds, Form Builder marks the record and all of the fields as Valid and does not re-validate. While this behavior is necessary to avoid validation loops, it does make it possible for your application to commit an invalid value to the database.
On Failure
If fired as part of validation initiated by navigation, navigation fails, and the focus remains on the original item.
2. Difference in Tabular & Form types of reports

Tabular Means that labels are above fields, and are outside the repeating frame containing the fields.

Form Means that labels are to the left of fields, and are inside the repeating frame containing the fields.

3. Post-Text-Item/When-Validate-Item

Post-Text-Item
It manipulates an item when Form Builder leaves a text item and navigates to the record level. Fires during the Leave the Item process for a text item. Specifically, this trigger fires when the input focus moves from a text item to any other item.
Use a Post-Text-Item trigger to calculate or change item values. It Fires every time On Failure Navigation fails and focus remains in the text item.
When-Validate-Item
It augments default validation of an item.
Fires during the Validate the Item process. Specifically, it fires as the last part of item validation for items with the New or Changed validation status.
Use a When-Validate-Item trigger to supplement Form Builder default item validation processing.
It is possible to write a When-Validate-Item trigger that changes the value of an item that Form Builder is validating. If validation succeeds, Form Builder marks the changed item as Valid and does not re-validate it. While this behavior is necessary to avoid validation loops, it does make it possible for your application to commit an invalid value to the database. On failure if fired as part of validation initiated by navigation, navigation fails, and the focus remains on the original item.

On particular condition disable whole record. How
Multiple Values in one item
WHEN/CALL Clause in Triggers

The WHEN trigger_condition specifies the conditions that must be met for the trigger to fire. Stored functions and object methods are not allowed in the trigger condition.
Optionally, a trigger restriction can be included in the definition of a row trigger by specifying a Boolean SQL expression in a WHEN clause (a WHEN clause cannot be included in the definition of a statement trigger).
If included, the expression in the WHEN clause is evaluated for each row that the trigger affects.
If the expression evaluates to TRUE for a row, the trigger body is fired on behalf of that row.
However, if the expression evaluates to FALSE or NOT TRUE (that is, unknown, as with nulls) for a row, the trigger body is not fired for that row.
The evaluation of the WHEN clause does not have an effect on the execution of the triggering SQL statement (that is, the triggering statement is not rolled back if the expression in a WHEN clause evaluates to FALSE).
For example, in the PRINT_SALARY_CHANGES trigger, the trigger body would not be executed if the new value of EMPNO is zero, NULL, or negative.
In more realistic examples, you might test if one column value is less than another.
The expression in a WHEN clause of a row trigger can include correlation names, which are explained below.
The expression in a WHEN clause must be a SQL expression and cannot include a subquery.
You cannot use a PL/SQL expression (including user-defined functions) in the WHEN clause.

Call Clause is used for calling a Procedure in a Trigger Body

No comments:

Post a Comment