Wednesday, May 29, 2013

Form Cum Block Level Application Triggers and their Scope


SL NONAMEPurpose
1ON-CLEAR-DETAILSFires when Oracle Forms needs to clear records in a block that is a detail block in a master/detail relation because those records no longer correspond to the current record in the master block.
/***********end of SL 1 *******/
2ON-CHECK-DELETE-MASTERFires when Oracle Forms attempts to delete a record in a block that is a master block in a master/detail relation.
/***********end of SL 2 *******/
3ON-CHECK-UNIQUEDuring a commit operation, the On-Check-Unique trigger fires when Oracle Forms normally checks that primary key values are unique before inserting or updating a record in a base table. It fires once for each record that has been inserted or updated.
Enter Query Mode
no Usage Notes : To perform the default processing from this trigger, call the CHECK_RECORD_UNIQUENESS built-inOn Failure: No effectFires In : Check Record Uniqueness
Post and Commit Transaction

/***********end of SL 3 *******/
4ON-CLOSEFires when an operator or the application causes a query to close. By default, Oracle Forms closes a query when all of the records identified by the query criteria have been fetched, or when the operator or the application aborts the query.

The On-Close trigger augments the normal Oracle Forms "close cursor" phase of a query.
Enter Query Mode noUsage Notes : Use an On-Close trigger after using the On-Select or On-Fetch triggers, specifically, to close files, close cursors, and free memory.
The On-Close trigger fires automatically when the ABORT_QUERY built-in is called from an On-Select trigger.
On Failure :  no effect
Abort_query: Close the query

/***********end of SL 4 *******/
5ON-COLUMN-SECURITYFires when Oracle Forms would normally enforce column-level security for each block that has the Enforce Column Security block property set On.
Enter Query Mode no
Usage Notes : To perform the default processing from this trigger, call the ENFORCE_COLUMN_SECURITY built-in.
On Failure : No effect
/***********end of SL 5 *******/
6ON-COUNTFires when Oracle Forms would normally perform default Count Query processing to determine the number of rows in the database that match the current query criteria. When the On-Count trigger completes execution, Oracle Forms issues the standard query hits message: FRM-40355: Query will retrieve <n> records.
Enter Query Mode yesUsage Notes :
Use an On-Count trigger to replace default Count Query processing in an application running against a non-ORACLE data source.

If you are replacing default processing, you can set the value of the Query_Hits block property to indicate the number of records in the non-ORACLE data source that match the query criteria.

Oracle Forms will display the query hits message (FRM-40355) even if the On-Count trigger fails to set the value of the Query_Hits block property. In such a case, the message reports 0 records identified.

On Failure :
 No effect

/***********end of SL 6 *******/
7ON-DELETEFires during the Post and Commit Transactions process and replaces the default Oracle Forms processing for handling deleted records during transaction posting. Specifically, it fires after the Pre-Delete trigger fires and before the Post-Delete trigger fires, replacing the actual database delete of a given row. The trigger fires once for each row that is marked for deletion from the database.
/***********end of SL 7 *******/
8ON-FETCHWhen a query is first opened, fires immediately after the On-Select trigger fires, when the first records are fetched into the block. While the query remains open, fires again each time a set of rows must be fetched into the block.
Enter Query Mode noUsage Notes :
When you write an On-Fetch trigger to replace default fetch processing, the trigger must do the following:
1)
Retrieve the appropriate number of records from the non-ORACLE data source, as indicated by the setting of the Records_To_Fetch property.
2)Create that number of queried records in the current block.
3)Populate the records with the retrieved data.
4)Create queried records from an On-Fetch trigger by calling the CREATE_QUERIED_RECORD built-in subprogram.
While the query remains open, the On-Fetch trigger continues to fire as more records are needed in the block. This behavior continues:
1)
until no queried records are created in a single execution of the trigger. Failing to create any records signals an end-of-fetch to Oracle Forms, indicating that there are no more records to be retrieved. 2)until the query is closed, either by the operator or programmatically through a call to ABORT_QUERY. 3)until the trigger raises the built-in exception FORM_TRIGGER_FAILUREDo not use an ABORT_QUERY built-in in an On-Fetch trigger. ABORT_QUERY is not valid in an On-Fetch trigger, and produces inconsistent results.
On Failure :
 No effects
Fires in : Fetch  records

/***********end of SL 8 *******/
9ON-INSERTFires during the Post and Commit Transactions process when a record is inserted. Specifically, it fires after the Pre-Insert trigger fires and before the Post-Insert trigger fires, when Oracle Forms would normally insert a record in the database. It fires once for each row that is marked for insertion into the database.
Usage Notes :Use an On-Insert trigger to replace the default Oracle Forms processing for handling inserted records during transaction posting.

To perform the default Oracle Forms processing from this trigger, include a call to the INSERT_RECORD built-in.

On Failure:

Oracle Forms performs the following steps when the On-Insert trigger fails.
sets the error location
rolls back to the most recent savepoint


/***********end of SL 9 *******/

10 ON-LOCK Description:
Fires whenever Oracle Forms would normally attempt to lock a row, such as when an operator presses a key to modify data in an item. The trigger fires between the keypress and the display of the modified data.
Legal Commands:
SELECT statements, unrestricted built-ins..
Enter Query Mode no 
Usage Notes :
i)
Use an On-Lock trigger to replace the default Oracle Forms processing for locking rows. For example, for an application intended for use on a single-user system, use the On-Lock trigger to speed processing by bypassing all lock processing. Also, use On-Lock when accessing a non-ORACLE data source directly, not by way of Open Gateway.
ii) When the On-Lock trigger fires as a result of an operator trying to modify data, the trigger fires only the first time the operator tries to modify an item in the record. The trigger does not fire during subsequent modifications to items in the same record. In other words, for every row that is to be locked, the trigger fires once.
iii) To perform the default Oracle Forms processing from this trigger, include a call to the LOCK_RECORD built-in.
Iv)Use this trigger to lock underlying tables for non-updateable views.
Caution:
In special circumstances, you may use the LOCK TABLE DML statement in an On-Lock trigger. However, as this could result in other users being locked out of the table, please exercise caution and refer to the ORACLE RDMS Database Administrator's Guide before using LOCK TABLE.
On Failure :When the On-Lock trigger fails, the target record is not locked and Oracle Forms attempts to put the input focus on the current item. If the current item cannot be entered for some reason, Oracle Forms attempts to put the input focus on the previous navigable item.
Fires In: Lock the Row
11 ON-POPULATE-DETAILS /***********end of SL 10 *******/

Description:

Oracle Forms creates this trigger automatically when a Master/Detail relation is defined. It fires when Oracle Forms would normally need to populate the detail block in a Master/Detail relation.
Legal Commands: SELECT statements, PL/SQL, unrestricted built-ins, restricted built-ins
Enter Query Mode no
Usage Notes :
Use an On-Populate-Details trigger when you have established a Master/Detail relationship and you want to replace the default populate phase of a query.

The On-Populate-Details trigger does not fire unless an On-Clear-Details trigger is present. If you are using the default Master/Detail functionality, Oracle Forms creates the necessary triggers automatically. However, if you are writing your own Master/Detail logic, be aware that the On-Clear-Details trigger must be present, even if it contains only the NULL statement.

When Immediate coordination is set, this causes the details of the instantiated master to be populated immediately. Immediate coordination is the defaul

When Deferred coordination is set and this trigger fires, Oracle Forms marks the blocks as needing to be coordinated.

If you intend to manage block coordination yourself, you can call the SET_BLOCK_PROPERTY (COORDINATION_STATUS) built-in.

On Failure : Can cause an inconsistent state in the form.
Fires In : Master/Detail Coordination
/***********end of SL 11 *******/
12 ON-SELECT Description:
Fires when Oracle Forms would normally execute the open cursor, parse, and execute phases of a query, to identify the records in the database that match the current query criteria.
Legal Commands :
SELECT statements, PL/SQL, unrestricted built-ins.
Enter Query Mode : No
Usage NotesUse an On-Select trigger to open and execute the database cursor. Specifically, use this trigger when you are retrieving data from a non-ORACLE data source. The On-Select trigger can be used in conjunction with the On-Fetch trigger to replace the processing that normally occurs in the EXECUTE_QUERY built-in subprogram.

To perform the default Oracle Forms processing from this trigger, include a call to the SELECT_RECORDS built-in.
On Failure : No effect.
Fires In : EXECUTE_QUERY ,Open The Query
/***********end of SL 12 *******/
13 ON-UPDATE Description:
Fires during the Post and Commit Transactions process while updating a record. Specifically, it fires after the Pre-Update trigger fires and before the Post-Update trigger fires, when Oracle Forms would normally update a record in the database. It fires once for each row that is marked for update in the form.
Legal Commands :
SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted built-ins.
Enter Query Mode no
Usage Notes :
Use an On-Update trigger to replace the default Oracle Forms processing for handling updated records during transaction posting.
To perform the default Oracle Forms processing from this trigger, include a call to the UPDATE_RECORD built-in.
On Failure : Oracle Forms performs the following steps when the On-Update trigger fails:
i) sets the error location
ii) rolls back to the most recently issued savepoint
Fires In :
Post and Commit Transactions
/***********end of SL 13 *******/
14 POST-BLOCK Description:
Fires during the Leave the Block process when the focus moves off the current block.
Legal Commands : SELECT statements, unrestricted built-ins.
Enter Query Mode no
Usage Notes:
Use a Post-Block trigger to validate the block's current record; that is, the record that had input focus when the Leave the Block event occurred.
Use this trigger to test a condition and prevent the user from leaving a block based on that condition.
On Failure:
If the trigger fails while trying to make the form the navigation unit, Oracle Forms tries to set the target to a particular block, record or item. Failing that, Oracle Forms attempts to put the cursor at a target location, but, if the target is outside of the current unit or if the operator indicates an end to the process, Oracle Forms aborts the form.
Fires In : Leave the Block
Post-Block Trigger Restrictions :
A Post-Block trigger does not fire when the Validation Unit form document property is set to Form
/***********end of SL 14 *******/
15 POST-DELETE Description : Fires during the Post and Commit Transactions process, after a row is deleted. It fires once for each row that is deleted from the database during the commit process.
Legal Commands : SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted built-in.
Enter Query Mode no
Usage Notes : Use a Post-Delete trigger to audit transactions.
On Failure :
Oracle Forms performs the following steps when the Post-Delete trigger fails:
i) sets the error location
ii)rolls back to the most recent savepoint
Fires In : Post and Commit Transactions
/***********end of SL 15 *******/
16 POST-INSERT Description: Fires during the Post and Commit Transactions process, just after a record is inserted. It fires once for each record that is inserted into the database during the commit process.
Legal Commands : SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted built-ins .
Enter Query Mode no
Usage Notes : Use a Post-Insert trigger to audit transactions.
On Failure : Oracle Forms performs the following steps when the Post-Insert trigger fails:
i) sets the error location
ii) rolls back to the most recent savepoint
Fires In : Post and Commit Transactions
/***********end of SL 16 *******/
17 POST-LOGON Description:
Fires after either of the following events:
i) The successful completion of Oracle Forms default logon processing.
Ii)The successful execution of the On-Logon trigger.
Legal Commands : SELECT statements, unrestricted built-ins.
Enter Query Mode no
Usage Notes:
Use a Post-Logon trigger to provide an event point for a task such as setting up a custom environment with special variables--to initialize on an application level rather than a form-by-form basis. You might accomplish this by initializing special global variables from this trigger.
On Failure : Varies based on the following conditions:

i)If the trigger fails during the first logon process, Oracle Forms exits the form, and returns to the operating system.
ii)If the trigger fails after a successful logon, Oracle Forms raises the built-in exception FORM_TRIGGER_FAILURE .
Fires In : LOGON
Post-Logon Trigger Example :
This example calls a user exit to log the current username and time to an encrypted audit trail file on the file system, which for security reasons is outside the database.
BEGIN
User_Exit('LogCrypt '||
USER||' ' ||
TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS'));
END;
/***********end of SL 17 *******/
18 POST-LOGOUT Description: Fires after either of the following events:
i) Oracle Forms successfully logs out of ORACLE.
Ii) The successful execution of the On-Logout trigger.
Legal Commands : SELECT statements, unrestricted built-ins.
Enter Query Mode no
Usage Notes :
Use a Post-Logout trigger to audit or to perform tasks on an Oracle Forms application that does not require or affect the RDBMS or other data source.

If you call certain built-ins from within one of the Logout triggers, the results are undefined. For example, you cannot call COPY from a Pre-Logout trigger because Pre-Logout fires after the Leave the Form event. Because the form is no longer accessible, a COPY operation is not possible.
On Failure :
If this trigger fails while leaving the form, there is no effect.

If this trigger fails and you have initiated a call to the LOGOUT built-in from within the trigger, FORM_FAILURE is set to TRUE.
Fires In : LOGOUT
/***********end of SL 18 *******/
19 POST-QUERY Description:
When a query is open in the block, the Post-Query trigger fires each time Oracle Forms fetches a record into a block. The trigger fires once for each record placed on the block's list of records.
Legal Commands : SELECT statements, unrestricted built-ins .
Enter Query Mode no
Usage Notes :
i)Use a Post-Query trigger to perform the following tasks
ii)calculate statistics about the records retrieved by a query
iii)calculate a running total
iv) When you use a Post-Query trigger to SELECT non-base table values into control items, Oracle Forms 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 .
On Failure:
Oracle Forms flushes the record from the block and attempts to fetch the next record from the database. If there are no other records in the database, Oracle Forms closes the query and waits for the next operator action.
Fires In : Fetch Records
Post-Query Trigger Examples:
This example retrieves descriptions for code fields, for display in non-database items in the current block.
DECLARE
CURSOR lookup_payplan IS SELECT Payplan_Desc
FROM Payplan
WHERE Payplan_Id = :Employee.Payplan_Id;
CURSOR lookup_area IS SELECT Area_Name
FROM Zip_Code
WHERE Zip = :Employee.Zip;
Open fetch close : Please check the example in Help Topic-CTRL+H
/***********end of SL 19 *******/ 
20 POST-RECORD Description:
Fires during the Leave the Record process. Specifically, the Post-Record trigger fires whenever the operator or the application moves the input focus from one record to another. The Leave the Record process can occur as a result of numerous operations, including INSERT_RECORD , DELETE_RECORD , NEXT_RECORD , NEXT_BLOCK , CREATE_RECORD , PREVIOUS_BLOCK , etc.
Legal Commands : SELECT statements, unrestricted built-ins.
Enter Query Mode no
Usage Notes :
Use a Post-Record trigger to perform an action whenever the operator or the application moves the input focus from one record to another. For example, to set a visual attribute for an item as the operator scrolls down through a set of records, put the code within this trigger.
On Failure :
The input focus stays in the current record.
Fires InLeave the Record
Post-Record Trigger Restrictions : A Post-Record trigger fires only when the form is run with a validation unit of the item or record, as specified by the Validation Unit form property.
/***********end of SL 20 *******/
21 POST-SELECT The Post-Select trigger fires after the default selection phase of query processing, or after the successful execution of the On-Select trigger. It fires before any records are actually retrieved through fetch processing.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode : No
Usage Note: Use the Post-Select trigger to perform an action based on the outcome of the Select phase of query processing such as an action based on the number of records that match the query criteria.
On Failure:
When the populate_group Built-in fails because the record group does not exist, a NULL value will be returned.
Execute the Query
Open the Query
/***********end of SL 21 *******/
22 POST-UPDATE Description :Fires during the Post and Commit Transactions process, after a row is updated. It fires once for each row that is updated in the database during the commit process.
Legal Commands : SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted function codes, unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a Post-Update trigger to audit transactions.
On Failure : Oracle Forms performs the following steps when the Post-Update trigger fails:
i)sets the error location
ii)rolls back to the most recent savepoint
Fires In : Post and Commit Transactions
/***********end of SL 22 *******/
23 PRE-BLOCK Description: Fires during the Enter the Block process, during navigation from one block to another.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a Pre-Block trigger to:
i)allow or disallow access to a block
ii )set variable values

On Failure :
Navigation fails and focus remains in the source item.
Fires In : Enter the Block
Pre-Block Trigger Restrictions  :
A Pre-Block trigger fires only when the form is run with a validation unit of the item, record, or block, as specified by the Validation Unit form property.
/***********end of SL 23 *******/
24 PRE-DELETE Description : Fires during the Post and Commit Transactions process, before a row is deleted. It fires once for each record that is marked for delete.
Note: Oracle Forms creates a Pre-Delete trigger automatically for any master-detail relation that has the Delete Record Behavior property set to Cascading.
Legal Commands : SELECT statements, Data Manipulation Language (DML) statements (i.e., DELETE, INSERT, UPDATE), unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a Pre-Delete trigger to delete the detail record of a master record.
  Use a Pre-Delete trigger to prevent the deletion of a record if that record is the master record for detail records that still exist.
On Failure : Oracle Forms performs the following steps when the Pre-Delete trigger fails:
i)sets the error location
ii)rolls back to the most recent savepoint
Fires In : Post and Commit Transactions
/***********end of SL 24 *******/
25 PRE-INSERT Description : Fires during the Post and Commit Transactions process, before a row is inserted. It fires once for each record that is marked for insert.
Legal Commands: SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a Pre-Insert trigger to perform the following tasks:
i)change item values
ii) keep track of the date a record is created and store that in the record prior to committing
On Failure :
Oracle Forms performs the following steps when the Pre-Insert trigger fails:
i) sets the error location
ii)rolls back to the most recent savepoint
Fires In : Post and Commit Transactions
Refer Example CTRL+H
/***********end of SL 25 *******/
26 PRE-QUERY Description :
Fires during Execute Query or Count Query processing, just before Oracle Forms constructs and issues the SELECT statement to identify rows that match the query criteria.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a Pre-Query trigger to modify the example record that determines which rows will be identified by the query.
On Failure : The query is canceled. If the operator or the application had placed the form in Enter Query mode, the form remains in Enter Query mode.
Fires In :

COUNT_QUERY
EXECUTE_QUERY
Open the Query
Prepare the Query
/***********end of SL 26 *******/
27 PRE-RECORD Description : Fires during the Enter the Record process, during navigation to a different record.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a Pre-Record trigger to keep a running total.
On Failure : Navigation fails and focus remains in the current item.
Fires In : Enter the Record
Pre-Record Trigger Restrictions : A Pre-Record trigger fires only when the form is run with a validation unit of the item or record, as specified by the Validation Unit form property.
Pre-Record Trigger Example: The following trigger prevents the user from entering a new record given some dynamic condition and the status of SYSTEM.RECORD_STATUS evaluating to NEW.
IF (( dynamic-condition)
AND :System.Record_Status = 'NEW') THEN
RAISE Form_Trigger_Failure;
END IF;
/***********end of SL 27 *******/
28 PRE-SELECT Description :
Fires during Execute Query and Count Query processing, after Oracle Forms constructs the SELECT statement to be issued, but before the statement is actually issued. Note that the SELECT statement can be examined in a Pre-Select trigger by reading the value of the system variable SYSTEM.LAST_QUERY .
Legal Commands : Legal Commands
Enter Query Mode no
Usage Notes : Use a Pre-Select trigger to prepare a query prior to execution against a non-ORACLE data source.
On Failure : No effect. The current query fetched no records from the table. The table is empty, or it contains no records that meet the query's search criteria.
Fires In :
EXECUTE_QUERY
Open the Query
Prepare the Query
/***********end of SL 28 *******/
29 PRE-UPDATE Description :
Fires during the Post and Commit Transactions process, before a row is updated. It fires once for each record that is marked for update.
Legal Commands : Legal Commands
SELECT statements, DML statements (DELETE, INSERT, UPDATE), unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a Pre-Update trigger to audit transactions.
On Failure: Oracle Forms performs the following steps when the Pre-Update trigger fails:
sets the error location
rolls back to the most recent savepoint
Fires In : Post and Commit Transactions
/***********end of SL 29 *******/
30 WHEN-BUTTON-PRESSED Description : Fires when an operator selects a button, by clicking with a mouse, or using the keyboard.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes : Use a When-Button-Pressed trigger to perform navigation, to calculate text item values, or for other item, block, or form level functionality.
On Failure :  no effect
When-Button-Pressed Trigger Example
This example executes a COMMIT_FORM if there are changes in the form.
BEGIN
IF :System.Form_Status = 'CHANGED' THEN
Commit_Form;
/*
** If the Form_Status is not back to 'QUERY'
** following a commit, then the commit was ** not successful.
*/
IF :System.Form_Status <> 'QUERY' THEN
Message('Unable to commit order to database...');
RAISE Form_Trigger_Failure;
END IF;
END IF;
END;
/***********end of SL 30 *******/
31 WHEN-CHECKBOX-CHANGED Description :
Fires when an operator changes the state of a check box, either by clicking with the mouse, or using the keyboard.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes:
Use a When-Checkbox-Changed trigger to initiate a task dependent upon the state of a check box.
When an operator clicks in a check box, the internal value of that item does not change until navigation is completed successfully. Thus, the When-Checkbox-Changed trigger is the first trigger to register the changed value of a check box item. So for all navigation triggers that fire before the When-Checkbox-Changed trigger, the value of the check box item remains as it was before the operator navigated to it.
On Failure :no effect /***********end of SL 31 *******/
32 WHEN-CLEAR-BLOCK Description :
Fires just before Oracle Forms clears the data from the current block.
Note that the When-Clear-Block trigger does not fire when Oracle Forms clears the current block during the CLEAR_FORM event.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode yes
Usage Notes :
Use a When-Clear-Block trigger to perform an action every time Oracle Forms flushes the current block. For example, you might want to perform an automatic commit whenever this condition occurs.

In a When-Clear-Block trigger, the value of SYSTEM.RECORD_STATUS is unreliable because there is no current record. An alternative is to use GET_RECORD_PROPERTY to obtain the record status. Because GET_RECORD_PROPERTY requires reference to a specific record, its value is always accurate.
On Failure : no effect on the clearing of the block
Fires In :
CLEAR_BLOCK
COUNT_QUERY
ENTER_QUERY
Open the Query
/***********end of SL 32 *******/
33 WHEN-CREATE-RECORD Description :
Fires when Oracle Forms creates a new record. For example, when the operator presses the [Insert] key, or navigates to the last record in a set while scrolling down, Oracle Forms fires this trigger.
Legal Commands: SELECT statements, unrestricted built-ins
Enter Query Mode no
Usage Notes:
Use a When-Create-Record trigger to perform an action every time Oracle Forms attempts to create a new record. This trigger also is useful for setting complex, calculated, or data-driven default values that must be specified at runtime, rather than at design-time.
On Failure : Prevents the new record from being created. Returns to the previous location, if possible.
Fires In : CREATE_RECORD
When-Create-Record Trigger Examples:
Example
This example assigns data-driven or calculated default values without marking the record as changed
DECLARE
CURSOR ship_dflt IS SELECT val
FROM cust_pref
WHERE Custid = :Customer.Custid
AND pref = 'SHIP';
BEGIN
/*
** Default Invoice Due Date based on Customer's
** Net Days Allowed value from the Customer block.
*/
:Invoice.Due_Date := SYSDATE + :Customer.Net_Days_Allowed;
/*
** Default the shipping method based on this customers
** preference, stored in a preference table. We could
** use SELECT...INTO, but explicit cursor is more
** efficient.
*/ OPEN ship_dflt;
FETCH ship_dflt INTO :Invoice.Ship_Method;
CLOSE ship_dflt;
END;
/***********end of SL 33 *******/
34 WHEN-CUSTOM-ITEM-EVENT Description : Fires whenever a JavaBean custom component in the form causes the occurrence of an event.
Legal Commands: unrestricted built-ins, restricted built-ins
Enter Query Mode:  yes
Usage Notes  :
Use a When-Custom-Item-Event trigger to respond to a selection or change of value of a custom component. The system variable SYSTEM.CUSTOM_ITEM_EVENT_PARAMETERS stores a parameter name that contains the supplementary arguments for an event that is fired by a custom control. Control event names are case sensitive
On Failure:no effect 
When-Custom-Item-Event Trigger JavaBeans Example :
Ref _OTN
35 WHEN-DATABASE-RECORD /***********end of SL 34 *******/
Description:

Fires when Oracle Forms first marks a record as an insert or an update. That is, the trigger fires as soon as Oracle Forms determines through validation that the record should be processed by the next post or commit as an insert or update. This generally occurs only when the operator modifies the first item in a record, and after the operator attempts to navigate out of the item.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode no
Usage Notes : Use a When-Database-Record trigger to perform an action every time a record is first marked as an insert or an update.
On Failure : no effect
/***********end of SL 35 *******/
36 WHEN-IMAGE-ACTIVATED Description:
Fires when an operator uses the mouse to
single-click on an image item
double-click on an image item
Note that When-Image-Pressed also fires on a double-click.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode no
On Failure : no effect
/***********end of SL 36 *******/
37 WHEN-IMAGE-PRESSED Description :
Fires when an operator uses the mouse to:
single-click on an image item
double-click on an image item
Note that When-Image-Activated also fires on a double-click
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes : Use a When-Image-Pressed trigger to perform an action when an operator clicks or double-clicks on an image item.
On Failure : no effect
/***********end of SL 37 *******/
38 WHEN-LIST-ACTIVATED Description:Fires when an operator double-clicks on an element in a list item that is displayed as a T-list.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes : A When-List-Activated trigger fires only for T-list style list items, not for drop-down lists or combo box style list items. The display style of a list item is determined by the List Style property.
On Failure : no effect
/***********end of SL 38 *******/
39 WHEN-LIST-CHANGED Description: Fires when an end user selects a different element in a list item or de-selects the currently selected element. In addition, if a When-List-Changed trigger is attached to a combo box style list item, it fires each time the end user enters or modifies entered text.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes :
Use a When-List-Changed trigger to initiate an action when the value of the list is changed directly by the end user. The When-List-Changed trigger is not fired if the value of the list is changed programmatically such as by using the DUPLICATE_ITEM Built-in, or if the end user causes a procedure to be invoked which changes the value. For example, the When-List-Changed trigger will not fire if an end user duplicates the item using a key mapped to the DUPLICATE_ITEM built-in.
On Failure : no effect
/***********end of SL 39 *******/
40 WHEN-NEW-BLOCK-INSTANCE Description :
Fires when the input focus moves to an item in a different block. Specifically, it fires after navigation to an item, when Oracle Forms is ready to accept input in a block that is different than the block that previously had the input focus.
In a multiple-form application, this trigger does not fire when focus changes from one form to another.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode no
On Failure : no effect
Fires In : Return for Input
/***********end of SL 40 *******/
41 WHEN-NEW-RECORD-INSTANCE Description:
Fires when the input focus moves to an item in a record that is different than the record that previously had input focus. Specifically, it fires after navigation to an item in a record, when Oracle Forms is ready to accept input in a record that is different than the record that previously had input focus. This trigger fires whenever Oracle Forms instantiates a new record.

In a multiple-form application, this trigger does not fire when focus changes from one form to another.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
On Failure : no effect
Fires In  :
Return for Input
/***********end of SL 41 *******/
42 WHEN-RADIO-CHANGED Description :
Fires when an operator selects a different radio button in a radio group, or de-selects the currently selected radio button, either by clicking with the mouse, or using the keyboard.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes :
Use a When-Radio-Changed trigger to perform an action depending on the state of a radio group. (De-selecting a radio button in a radio group sets the radio group value to NULL; operators use this technique in Enter Query mode to exclude a radio group from a query.)

When an operator clicks an item in a radio group, the internal value of that item does not change until navigation is completed successfully. Thus, the When-Radio-Changed trigger is the first trigger to register the changed value of a radio group. For all navigation triggers that fire before the When-Radio-Changed trigger, the value of the radio group remains as it was before the operator navigated to it.

On Failure : no effect
/***********end of SL 42 *******/
43 WHEN-REMOVE-RECORD Description : Fires whenever the operator or the application clears or deletes a record.
Legal Commands :
SELECT statements, unrestricted Built-ins
Enter Query Mode no
Usage Notes : Use a When-Remove-Record trigger to perform an action every time Oracle Forms clears or deletes a record.
On Failure : Oracle Forms navigates to the block level with or without validation depending on the current operation, and puts the cursor at the target block.
Fires In :
CLEAR_RECORD
DELETE_RECORD
/***********end of SL 43 *******/
44 WHEN-TREE-NODE-ACTIVATED Description : Fires when an operator double-clicks a node or presses Enter when a node is selected.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes :
SYSTEM.TRIGGER_NODE is the node the user clicked on. SYSTEM.TRIGGER_NODE returns a value of type NODE.
No programmatic action will cause the When-Tree-Node-Activated trigger to fire. Only end-user action will generate an event.
On Failure : no effect
/***********end of SL 44 *******/
45 WHEN-TREE-NODE-EXPANDED Description : Fires when a node is expanded or collapsed.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes :
SYSTEM.TRIGGER_NODE is the node the user clicked on. SYSTEM.TRIGGER_NODE returns a value of type NODE.
No programmatic action will cause the When-Tree-Node-Espanded trigger to fire. Only end-user action will generate an event.
On Failure : no effect
/***********end of SL 45 *******/
46 WHEN-TREE-NODE-SELECTED Description : Fires when a node is selected or deselected.
Legal Commands : SELECT statements, unrestricted built-ins, restricted built-ins
Enter Query Mode yes
Usage Notes :
SYSTEM.TRIGGER_NODE is the node the user clicked on. SYSTEM.TRIGGER_NODE returns a value of type NODE.
No programmatic action will cause the When-Tree-Node-Selected trigger to fire. Only end-user action will generate an event.

On Failure :
no effect
/***********end of SL 46 *******/
47 WHEN-VALIDATE-RECORD Description :
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.
Legal Commands : SELECT statements, unrestricted built-ins
Enter Query Mode no
Usage Notes :
Use a When-Validate-Record trigger to supplement Oracle Forms 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 Oracle Forms is validating. If validation succeeds, Oracle Forms 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.

Fires In : Validate the Record
/***********end of SL 47 *******/

Tuesday, May 28, 2013

Difference between mv and cp command in Linux


mv command in Unix  : mv is used to move or rename the files but it will delete the original file while moving.

cp command in Unix   : cp is used to copy the files but like mv  it will  not delete the original file means original file remain as it is.


[rajani@localhost ~]$ cat > myfile
This is my 1st line
This is my 2nd line
[rajani@localhost ~]$ ls -l
total 28
-rw-r--r-- 1 rajani users   0 May 27 19:37 cha02
-rw-r--r-- 1 rajani users   0 May 27 19:37 chap01
-rw-r--r-- 1 rajani users   0 May 27 19:37 chap03
-rw-r--r-- 1 rajani   504 141 May 27 23:07 dbhome.txt
-rw-r--r-- 1 rajani users  40 May 28 09:00 myfile  
[rajani@localhost ~]$ 

[rajani@localhost ~]$ cp myfile myfilenew
[rajani@localhost ~]$ ls -l
total 36
-rw-r--r-- 1 rajani users   0 May 27 19:37 cha02
-rw-r--r-- 1 rajani users   0 May 27 19:37 chap01
-rw-r--r-- 1 rajani users   0 May 27 19:37 chap03
-rw-r--r-- 1 rajani   504 141 May 27 23:07 dbhome.txt
-rw-r--r-- 1 rajani users  40 May 28 09:00 myfile
-rw-r--r-- 1 rajani users  40 May 28 09:01 myfilenew
[rajani@localhost ~]$ mv myfile myfilenn
[rajani@localhost ~]$ ls -l
total 36
-rw-r--r-- 1 rajani users   0 May 27 19:37 cha02
-rw-r--r-- 1 rajani users   0 May 27 19:37 chap01
-rw-r--r-- 1 rajani users   0 May 27 19:37 chap03
-rw-r--r-- 1 rajani   504 141 May 27 23:07 dbhome.txt
-rw-r--r-- 1 rajani users  40 May 28 09:01 myfilenew
-rw-r--r-- 1 rajani users  40 May 28 09:00 myfilenn
[rajani@localhost ~]$

cp command created a new file myfilenew with new timestamp but didn't delete the myfile.

mv command renamed the existing file with no timestamp change to myfilenn and deleted the old file myfile.

cheers
Rajani


-bash: sqlplus: command not found - error while connecting sqlplus through Putty (VMWARE)

Oracle 10g express edition for Linux 


login as: rajani
rajani@192.168.1.172's password:
Last login: Sun Apr 21 17:59:22 2013 from 192.168.1.18
[rajani@localhost ~]# sqlplus
-bash: sqlplus: command not found
[rajani@localhost ~]#


1st Method by finding the oracle enivironment file :

Find the oracle_env.sh file

find / -name oracle_env.sh -print

[rajani@localhost ~]$ find / -name oracle_env.sh -print

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

Then 

[rajani@localhost ~]$ source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

[rajani@localhost ~]$ sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 28 00:04:44 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: hr
Enter password:

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL>

2nd Method by editing the .bash_profile file 


Step1. You need to find oracle home directory

find / -name sqlplus -print


On the output of this command you should have some lines telling you where are the sqlplus command.
By example, imagine that the output has something like this:

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/sqlplus

Then your  ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server (FYI only) 

Step2 : (only perform this step) 

edit the .bash_profile as follows

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
export ORACLE_SID=XE
export PATH=$PATH:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

Then save it ESC:wq

Then execute the .bash_profile (./.bash_profile ) by pre-setting  permission to 777. 

Come out of putty and login again.

login as: rajani
rajani@192.168.1.172's password:
Last login: Tue May 28 00:03:12 2013 from 192.168.1.18
[rajani@localhost ~]$ sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Tue May 28 00:08:08 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: hr/hr

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production


Hope this helps.

Cheers 

Rajani

Friday, May 24, 2013

Form Level Application Triggers and its Scope

SL NO NAME At Form Level
1 ON-COMMIT Description:Fires whenever Oracle Forms would normally issue a database commit statement to finalize a transaction. By default, this operation occurs after all records that have been marked as updates, inserts, and deletes have been posted to the database. The default COMMIT statement that Oracle Forms issues to finalize a transaction during the Post and Commit Transactions process.
Usage: Use an On-Commit trigger to change the conditions of normal Oracle Forms commit processing to fit the particular requirements of a commit to a non-ORACLE database.
On Failure : Aborts Post and Commit processing
Fires In : Post and Commit Transactions
On-Commit Trigger Example:
 This example disables the commit operation when running against a datasource that does not support transaction control. If the application is running against ORACLE, the commit operation behaves normally.
BEGIN
IF Get_Application_Property(DATA_SOURCE) = 'ORACLE' THEN
Commit_Form;
 ELSIF form_fatal OR form_failure THEN
raise form_trigger_failure;
END IF; /* ** Otherwise, no action is performed */ END; 
/*******END OF SL 1 **************/
2 ON-LOGON Description:Fires once for each logon when Oracle Forms normally initiates the logon sequence.
Enter Query Mode no
Usage Notes : Use an On-Logon trigger to initiate a logon procedure to a non-ORACLE data source. Pre-Logon and Post-Logon triggers fire as part of the logon procedure. To create an application that does not require a data source, supply a NULL command to this trigger to bypass the connection to a data source. To perform the default Oracle Forms processing from this trigger, include a call to the LOGON built-in.
On Failure : Oracle Forms attempts to exit the form gracefully, and does not fire the Post-Logon trigger.
/*******END OF SL 2 **************/
3 ON-LOGOUT Description: Fires when Oracle Forms normally initiates a logout procedure from Oracle Forms and from the RDBMS.
/*******END OF SL 3 **************/
4 ON-ROLLBACK Description:Fires when Oracle Forms would normally issue a ROLLBACK statement, to roll back a transaction to the last savepoint that was issued.
/*******END OF SL 4 **************/
5 ON-SAVEPOINT
Description:
Fires when Oracle Forms would normally issue a Savepoint statement. By default, Oracle Forms issues savepoints at form startup, and at the start of each Post and Commit Transaction process.
Fires In :
CALL_FORM
Post and Commit Transactions
SAVEPOINT
/*******END OF SL 5 **************/
6 POST-DATABASE-COMMIT Description: Fires once during the Post and Commit Transactions process, after the database commit occurs. Note that the Post-Forms-Commit trigger fires after inserts, updates, and deletes have been posted to the database, but before the transaction has been finalized by issuing the Commit. The Post-Database-Commit Trigger fires after Oracle Forms issues the Commit to finalize the transaction.  it fires later , first post-forms-commit fires.
/*******END OF SL 6 **************/
7 POST-FORM Description:Fires during the Leave the Form process, when a form is exited.
Usage Notes:
Use a Post-Form trigger for the following tasks: To clean up the form before exiting.
For example, use a Post-Form trigger to erase any global variables that the form no longer requires.
To display a message to the operator upon form exit.
This trigger does not fire when the form is exited abnormally, for example, if validation fails in the form.
/*******END OF SL 7 **************/
8 POST-FORMS-COMMIT Description:Fires once during the Post and Commit Transactions process. If there are records in the form that have been marked as inserts, updates, or deletes, the Post-Forms-Commit trigger fires after these changes have been written to the database but before Oracle Forms issues the database Commit to finalize the transaction.
If the operator or the application initiates a Commit when there are no records in the form have been marked as inserts, updates, or deletes, Oracle Forms fires the Post-Forms-Commit trigger immediately, without posting changes to the database.
Enter Query Mode no
Usage Notes: Use a Post-Forms-Commit trigger to perform an action, such as updating an audit trail, anytime a database commit is about to occur.
On failure : Aborts post and commit processing: Oracle Forms issues a ROLLBACK and decrements the internal Savepoint counter.
Fires in : Post and Commit Transactions
/*******END OF SL 8 **************/
9 PRE-COMMIT Description:Fires once during the Post and Commit Transactions process, before Oracle Forms processes any records to change. Specifically, it fires after Oracle Forms determines that there are inserts, updates, or deletions in the form to post or commit, but before it commits the changes. The trigger does not fire when there is an attempt to commit, but validation determines that there are no changed records in the form. Pre-Commit does fire in case of Post when there is no change in the form, but there are uncommited changes in the database.

Usage :
Use a Pre-Commit trigger to perform an action, such as setting up special locking requirements, at any time a database commit is going to occur.
On Failure :
The Post and Commit process fails: No records are written to the database and focus remains in the current item.
/*******END OF SL 9 **************/
10 PRE-FORM
Description
: Fires during the Enter the Form event, at form startup, before Forms navigates to the first navigable block of that form.
Enter Query Mode no
Use a Pre-Form trigger to perform the following tasks:
1)assign unique primary key from sequence
2)restrict access to a form
 3)initialize global variables

On Failure : Oracle Forms leaves the current form and fires no other trigger.
Fires In : Enter the Form
/*******END OF SL 10 **************/

11 PRE-LOGON Description: Fires just before Oracle Forms initiates a logon procedure to the data source.
Enter Query Mode no
Usage : Use a Pre-Logon trigger to prepare the form for the logon procedure, particularly to a non-ORACLE data source.
On Failure : The results of a failure depend on which of the following conditions applies:
If Oracle Forms is entering the form for the first time and the trigger fails, the form is exited gracefully, but no other triggers are fired.
If the trigger fails while Oracle Forms is attempting to execute the LOGON built-in from within the trigger, Oracle Forms raises the FORM_TRIGGER_FAILURE exception.
/*******END OF SL 11 **************/
12 PRE-LOGOUT Description:Fires once before Oracle Forms initiates a logout procedure.
Usage : Use a Pre-Logout trigger to prepare the form for logging out from the data source, particularly a non-ORACLE data source.
If you call certain built-ins from within one of the Logout triggers, the results are undefined. For example, the COPY built-in cannot be called from a Pre-Logout trigger because Pre-Logout fires after the Leave the Form event. Because the form is no longer accessible at this point, the COPY operation is not possible.

On Failure
: The results of a failure depend on which of the following conditions applies:
If Oracle Forms is exiting the form and the trigger fails, the form is exited gracefully, but no other triggers are fired.
If the trigger fails while Oracle Forms is attempting to execute the LOGOUT built-in from within the trigger, Oracle Forms raises the FORM_TRIGGER_FAILURE exception.
If an exception is raised in a Pre-Logout trigger, Oracle Forms does not fire other triggers, such as On-Logout and Post-Logout .
Fires in : LOGOUT
/*******END OF SL 12 **************/
13 WHEN-FORM-NAVIGATE Description: Fires when navigation between forms takes place, such as when the user changes the focus to another loaded form.
Enter Query Mode: No
Usage Notes: Use a When-Form-Navigate trigger to perform actions when any cross form navigation takes place without relying on window activate and window deactivate events.
On Failure
: No effect.
When-Form-Navigate Trigger Example:
DECLARE
win_id WINDOW := FIND_WINDOW('WINDOW12');
BEGIN
if (GET_WINDOW_PROPERTY(win_id,WINDOW_STATE) = 'MAXIMIZE' THEN
SET_WINDOW_PROPERTY(win_id,WINDOW_STATE,MINIMIZE);
else
SET_WINDOW_PROPERTY(win_id,WINDOW_STATE,MAXIMIZE);
end if;
END
/*******END OF SL 13 **************/
14 WHEN-NEW-FORM-INSTANCE

Description: At form start-up, Oracle Forms navigates to the first navigable item in the first navigable block. A When-New-Form-Instance trigger fires after the successful completion of any navigational triggers that fire during the initial navigation sequence.

This trigger does not fire when control returns to a calling form from a called form.
In a multiple-form application, this trigger does not fire when focus changes from one form to another.
On Failure : No effect.
Fires in : Run the form
When-New-Form-Instance Trigger Restrictions : When a new form is called, it will appear in the default x-y position on the screen. If this is not the desired position, you can change the x-y coordinates. However, they cannot be changed in this When-New-Form-Instance trigger. (This trigger fires too late in the sequence.) To change the coordinates, use the Pre-Form trigger.

Example:
BEGIN
Populate_Dynamic_Boilerplate;
Start_OnScreen_Clock_Timer;
Go_Block('EMP');
/*
** Query the block without showing
** the working message.
*/
:System.Suppress_Working := 'TRUE';
Execute_Query;
:System.Suppress_Working := 'FALSE';
END;

/*******END OF SL 14 **************/
15 WHEN-TAB-PAGE-CHANGED

Description:
Fires whenever there is explicit item or mouse navigation from one tab page to another in a tab canvas.
Enter Query Mode no
Usage Notes :
Use a When-Tab-Page-Changed trigger to perform actions when any tab page is changed during item or mouse navigation.
When-Tab-Page-Changed fires only when tab page navigation is explicit; it does not respond to implicit navigation. For example, the trigger will fire when the mouse or keyboard is used to navigate between tab pages, but the trigger will not fire if an end user presses [Next Item] (Tab) to navigate from one field to another field in the same block, but on different tab pages.
When-Tab-Page-Changed does not fire when the tab page is changed programmatically.
On Failure :  no effect.
/*******END OF SL 15 **************/
16 WHEN-TIMER-EXPIRED Description: Fires when a timer expires.
Usage NotesTimers are created programmatically by calling the CREATE_TIMER built-in procedure.
The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing.
Use a When-Timer-Expired trigger to initiate an event, update item values, or perform any task that should occur after a specified interval.
You can call GET_APPLICATION_PROPERTY(TIMER_NAME) in a When-Timer-Expired trigger to determine the name of the most recently expired timer.
On failure :  No effect
Fires In : Process Expired Timer
When-Timer-Expired Trigger Restrictions : A When-Timer-Expired trigger will not fire when the user is currently navigating a menu.
/*******END OF SL 16 **************/
17 WHEN-WINDOW-ACTIVATED Description:
Fires when a window is made the active window. This occurs at form startup and whenever a different window is given focus. Note that on some window managers, a window can be activated by clicking on its title bar. This operation is independent of navigation to an item in the window. Thus, navigating to an item in a different window always activates that window, but window activation can also occur independently of navigation.
Enter Query Mode yes
Usage Notes : Use this trigger to perform the following types of tasks.
1)Capture initial settings of window properties, by way of the GET_WINDOW_PROPERTY built-in.
2)Enforce navigation to a particular item whenever a window is activated.
3)Keep track of the most recently fired window trigger by assigning the value from SYSTEM.EVENT_WINDOW to a variable or global variable.
On failure : No effect.
/*******END OF SL 17 **************/
18 WHEN-WINDOW-CLOSED Description:
Fires when an operator closes a window using a window-manager specific Close command.
Enter Query Mode yes
Usage Notes : Use this trigger to programmatically close a window when the operator issues the window-manager Close command.
You can hide the window that contains the current item.
On failure : no effect
Example : The following example of a call to SET_WINDOW_PROPERTY from this trigger closes a window whenever the operator closes it by way of the window manager operation:
Set_Window_Property('window_name', VISIBLE, PROPERTY_OFF);
/*******END OF SL 18 **************/
19 WHEN-WINDOW-DEACTIVATED DescriptionFires when an operator deactivates a window by setting the input focus to another window within the same form.
Enter Query Mode yes
Usage Notes :
Use this trigger to audit the state of a window whenever the operator deactivates the window by setting the input focus in another window.
Note that if this form opens another form, this deactivate trigger does not immediately fire. Instead, it will fire later when control returns to this form. (Assuming this window also has an activate trigger, then when control returns to this form, first the deactivate trigger fires followed immediately by the activate trigger.)
/*******END OF SL 19 **************/
20 WHEN-WINDOW-RESIZED Description: Fires when a window is resized, either by the operator or programmatically through a call to RESIZE_WINDOW or SET_WINDOW_PROPERTY. (Even if the window is not currently displayed, resizing the window programmatically fires the When-Window-Resized trigger.) This trigger also fires at form startup, when the root window is first drawn. It does not fire when a window is iconified.
Enter Query Mode yes
Usage Notes :
Use this trigger to perform any one of the following types of tasks:
a )Capture the changed window properties, such as width, height, x coordinate, or y coordinate.
b) Audit the actions of an operator.
c) Set the input focus in an item on the target window.
d) Maintain certain visual standards by resetting window size if the window was improperly resized.
/*******END OF SL 20 **************/