Saturday, October 11, 2008

Q.What are the types of triggers in forms ?

Interface triggers (ie,when-button-pressed,key- etc)
Navigational tri (e.g, pre-form,pre- and post- tri)
Transactional tri (e.g on- tri,when-post-form commit)
Query time tri ( pre-query,post-query)
Master-detail tri(e.g on-check-delete-master,on-clear-details,on-populate-details)
Validation tri (e.g when-validate-item,when-validate-record)

Q.What are different triggers got created when creating master-detail relation ?

Block-level trigger
ON-POPULATE-DETAILS
ON-CHECK-DELETE-MASTER
Form level triggers
ON-CLEAR-DETAILS
Procedures got created
Check_Package_Failure
Clear_All_Master_Details
Query_Master_Details


Q.Is possible to read registry values in the form?
Yes,by using procedure d2kutil.pll available in ORACLE_HOME/tools/devdemo60/demo/forms dir
Read_registry,write_registry procedure in WIN_API_ENVIRONMENT pakage will read /write

1.How to make insert allowed and update allowed on for the record instance
By setting app_item_property.set_property(item,ALTERABLE,PROPERTY_ON);
Is similar to set_item_instance_property(item name,current_record,insert_allowed,property_on);
“ update_allowed, “
set_item_property( item_name,insert_allowed,property_on);
set_item_property( item_name,updatet_allowed,property_on);

2. They are update_allowed,insert_allowed,navigable proberty in both item level and instance level so if you set both which will take effect.
Always the item level will take presdence ,ie) if you have off in item and on at instance then over all effect is off

3.How to assign/maintain running no’s to the multi record block.
At key-execute query call app_record.for_all_records(‘user named triger_name’);
Key-delrec “ “
This routine will trigger this user named trigger written at block level to fire as many times as the no of records and it will go the current record so create the parameter and increment the parameter and assign it to the number field.

4.How to show fixed fields ( current record indicator,scroll bar ) for tab canvas that has same record fields in more than one tab.
Create the stacked canvas and keep those fields there

5.What are tab canvas additions in forms 6I
when-tab-page-changed ( form level trigger, if you write in block level then no use)
set_tab_page_property
: SYSTEM.TAB_NEW_PAGE
: SYSTEM.TAB_PREVIOUS_PAGE
:system.event_canvas

6.What are java beans additions in forms 6I
when-custom-item-event
System.Custom_Item_Event
System.Custom_Item_Event_Parameters
Item Property implementation class

7.Is when-window-open trigger exits ?
No ,only the following trigger exits for window
1.When-window-closed
2. When-Window-Activated
3. When-Window-Deactivated
4. When-Window-Resized

8.What is the diff between when-validate-item and post-change
Form Builder fetches a non-NULL value into an item. In this case, the When-Validate-Item trigger does not fire. If you want to circumvent this situation and effectively get rid of the Post-Change trigger, you must include a Post-Query trigger in addition to your When-Validate-Item trigger.

9.How to set the menu for single record block ?
At when-new-record-instance call the following buildi-ins
App_standard.event(‘when-new-record-instance’);
App_special.enable(‘SINGLE’,PROPERTY_OFF);

Q.Execution style of the trigger should be either override or before never after in apps.
In general use before,
Usage: Specifies how the current trigger code should execute if there is a trigger with the same name defined at a higher level in the object hierarchy.
The following settings are valid for this property:
Override Specifies that the current trigger fire instead of any trigger by the same name at any higher scope. This is known as "override parent" behavior.
Before Specifies that the current trigger fire before firing the same trigger at the next-higher scope. This is known as "fire before parent" behavior.
After Specifies that the current trigger fire after firing the same trigger at the next-higher scope. This is known as "fire after parent" behavior.

10.At what levels forms will sync it internal setting with the menu entries ?
At when-new-record-insance, when-new-block-instance,when-new-item-instance
So if you are in the block and then you are making insert allowed off then you have to call the build-in app_standard.synchronize to sync the menu entries.

11.Is possible to hide the tab page ?
yes ,call SET_TAB_PAGE_PROPERTY
(tab_page_id TAB_PAGE,
property NUMBER,
value NUMBER);

VISIBLE, ENABLED property_false

12.How to code complicated tab_canvas ?
modify the sample code supplied by oracle in FND_TOP/resource fndtabs.txt and fndtanff.txt ?

13.How to force form to do validation ?
call validate(item_scope)
“ (form_scope)
“ (reord_scope)
“ (block_scope)


14.what are :system_mode status ?
NORMAL Indicates that the form is currently in normal processing mode.
ENTER-QUERY Indicates that the form is currently in Enter Query mode.
QUERY Indicates that the form is currently in fetch processing mode, meaning that a query is currently being processed.


16.What are :system.form_staus ?
CHANGED Indicates that the form contains at least one block with a Changed record. The value of SYSTEM.FORM_STATUS becomes CHANGED only after at least one record in the form has been changed and the associated navigation unit has also changed.
NEW Indicates that the form contains only New records.
QUERY Indicates that a query is open. The form contains at least one block with QUERY records and no blocks with CHANGED records.

15.what are :system.block_status ?
CHANGED Indicates that the block contains at least one Changed record.
NEW Indicates that the block contains only New records.
QUERY Indicates that the block contains only Valid records that have been retrieved from the database.

16. what are :system.record_status ?
CHANGED Indicates that a queried record's validation status is Changed.
INSERT Indicates that the record's validation status is Changed and that the record does not exist in the database.
NEW Indicates that the record's validation status is New.
QUERY Indicates that the record's validation status is Valid and that it was retrieved from the database.


17.what are all system variables

SYSTEM.BLOCK_STATUS
SYSTEM.COORDINATION_OPERATION
SYSTEM.CURRENT_BLOCK
SYSTEM.CURRENT_DATETIME
SYSTEM.CURRENT_FORM
SYSTEM.CURRENT_ITEM
SYSTEM.CURRENT_VALUE
SYSTEM.CURSOR_BLOCK
SYSTEM.CURSOR_ITEM
SYSTEM.CURSOR_RECORD
SYSTEM.CURSOR_VALUE
SYSTEM.CUSTOM_ITEM_EVENT
SYSTEM.CUSTOM_ITEM_EVENT_PARAMETERS
SYSTEM.DATE_THRESHOLD*
SYSTEM.EFFECTIVE_DATE*
SYSTEM.EVENT_WINDOW
SYSTEM.FORM_STATUS
SYSTEM.LAST_QUERY
SYSTEM.LAST_RECORD
SYSTEM.MASTER_BLOCK
SYSTEM.MESSAGE_LEVEL*
SYSTEM.MODE
SYSTEM.MOUSE_BUTTON_PRESSED
SYSTEM.MOUSE_BUTTON_SHIFT_STATE
SYSTEM.MOUSE_ITEM
SYSTEM.MOUSE_CANVAS
SYSTEM.MOUSE_X_POS
SYSTEM.MOUSE_Y_POS
SYSTEM.MOUSE_RECORD
SYSTEM.MOUSE_RECORD_OFFSET
SYSTEM.RECORD_STATUS
SYSTEM.SUPPRESS_WORKING*
SYSTEM.TAB_NEW_PAGE
SYSTEM.TAB_PREVIOUS_PAGE
SYSTEM.TRIGGER_BLOCK
SYSTEM.TRIGGER_ITEM
SYSTEM.TRIGGER_RECORD

22.How to create block based on from clause ?
select query data source type property to FROM clause query and in query data source name property write your SQL statements

23.How to pass instructions to a form ? (fin)

eg. Take 2 forms order and catalog
in the order form create global.part_no and also create global.when_form_navigate and set that to query_part_no and in catalog create user_named trigger query_part_no which will get fired when cursor moves to the called form so call execute query here and write pre_query.

Q.What is the diff between :system.cursor_item and :system.trigger_item

SYSTEM.CURSOR_ITEM represents the name of the block and item, block.item, where the input focus (cursor) is located.
Within a given trigger, the value of SYSTEM.CURSOR_ITEM changes when navigation takes place. This differs from SYSTEM.TRIGGER_ITEM, which remains the same from the beginning to the end of single trigger.
e.g)
Assume that you want to create a user-defined procedure that takes the value of the item where the cursor is located (represented by SYSTEM.CURSOR_VALUE), then multiplies the value by a constant, and then reads the modified value into the same item. The following user-defined procedure uses the COPY built-in to perform this function.

PROCEDURE CALC_VALUE IS
new_value NUMBER;
BEGIN
new_value := TO_NUMBER(:System.Cursor_Value) * .06;
Copy(TO_CHAR(new_value), :System.Cursor_Item);
END;

SYSTEM.TRIGGER_ITEM represents the item (BLOCK.ITEM) in the scope for which the trigger is currently firing. When referenced in a key trigger, it represents the item where the cursor was located when the trigger began. The value is always a character string.
SYSTEM.TRIGGER_ITEM remains the same from the beginning to the end of given trigger. This differs from SYSTEM.CURSOR_ITEM, which may change within a given trigger when navigation takes place.
e.g)
Assume that you want to write a user-defined procedure that navigates to the item where the cursor was when the current trigger initially fired. The following statement performs this function.

Go_Item(:System.Trigger_Item);

Q.How to trap error and message codes and text ?
Using error_code ,error_text ,message_code and message_text build –ins,
Dbms_error_code,dbms_error_text

Q.Query array size ?
If it is 0 then array size is same as the no of records displayed.

Q.No of records buffered ?
If 0 means the no of records in the block that are held in memory is equal to the no of records displayed plus three

Q.Query all records ?
Usually set to No . thismeans that the block will initially query only the no of rows set in the query array size property .this we may need to set to Yes to calculate the summary val.

Note1. . Call_form is unrestricted procedure where as open_form,new_form are restricted.
Note2 .Call_form , if form A calls form B then both are using the same database connection so it is not possible to commit each seperatly ,in that case post the changes in B and then commit in A.
Note3. New_form will exit form A and enters B
Note4.open_form allows you to open more than one form also let you to open another db session , so you can commit seperatly
Open_form options:
------------------------
NO_SESSION (The default.) Specifies that the opened form should share the same database session as the current form. POST and COMMIT operations in any form will cause posting, validation, and commit processing to occur for all forms running in the same session.

SESSION Specifies that a new, separate db connection



18.What are all master-detail relations ?
They are
Detail Block Enter the name of a block to be related to the master block, or click Select for a list of available blocks from which to choose. The Detail block must already exist before you can create a new relation to it.
Master Deletes Determines what occurs when a record in the master block is deleted. Set one of the following:
Cascading: Allows master record to be deleted and automatically deletes associated detail records upon commit. Only records in the immediate detail block are deleted.
Isolated: Allows master record to be deleted, but does not effect the associated detail records.
Non-isolated: Prevents the master record from being deleted if there are associated detail records.
Coordination Deferred: Detail records are not automatically fetched. The user must navigate to the detail block and explicitly execute a query
Auto-Query: Detail records are fetched when the user navigates to the associated detail block. Part of the Deferred setting.
Prevent Masterless Operation: Prevents inserting or querying records in the detail block when there is no associated master record.
Join Condition Enter a valid join condition in the multi-line field. The join condition defines the relationship between the master block specified in the Master text box and the detail block specified in the Detail text box. See Specifying the join condition for a master-detail relation.
Example: warehouse.region_id = region.id
Object REF Specifies a join condition based on an object which exists on both the master block and the detail block. Select an object from the drop-down box.

No comments:

My Zimbio
Top Stories