How to Enable Folder Functionality in Custom Forms
Follow following steps to enable Folder Functionality in Custom Form or if you want to export column heading in export file along with data:
Attach APPFLDR Library
APPFLDR can be found in $AU_TOP/Res/Plsql directory on server where forms are residing.
APPFLDR can be found in $AU_TOP/Res/Plsql directory on server where forms are residing.
Reference STANDARD_FOLDER Object Groups
STANDARD_FOLDER Object group can be referenced from APPSTAND form which resides in $AU_TOP/Res/US. This will also copies the dependent objects required for object group.
STANDARD_FOLDER Object group can be referenced from APPSTAND form which resides in $AU_TOP/Res/US. This will also copies the dependent objects required for object group.
Create <BLOCKNAME>_RECORD_COUNT parameter
Create <BLOCKNAME>_RECORD_COUNT parameter where BLOCKNAME is the name of the block containing columns to be displayed. Data Type should be Number and Put default Value of 2.
Create <BLOCKNAME>_RECORD_COUNT parameter where BLOCKNAME is the name of the block containing columns to be displayed. Data Type should be Number and Put default Value of 2.
Canvas
You need two canvas- one content and one stacked. Let us name content canvas as PROJECT_FOLDER and stacked canvas as PROJECT_STACK. Both the canvas have same window.
You need two canvas- one content and one stacked. Let us name content canvas as PROJECT_FOLDER and stacked canvas as PROJECT_STACK. Both the canvas have same window.
Windows
Create One Window. Name it PROJECT_FOLDER with view name as PROJECT_FOLDER
Create One Window. Name it PROJECT_FOLDER with view name as PROJECT_FOLDER
Blocks
Main Block:
Create a block (BLOCKNAME) containing database columns. Items should be on Stacked canvas (PROJECT_STACK). Also create following eight triggers:
Main Block:
Create a block (BLOCKNAME) containing database columns. Items should be on Stacked canvas (PROJECT_STACK). Also create following eight triggers:
WHEN-NEW-BLOCK-INSTANCE
app_folder.event(‘WHEN-NEW-BLOCK-INSTANCE’);
app_folder.event(‘WHEN-NEW-BLOCK-INSTANCE’);
KEY-PREV-ITEM
if (:parameter.<blockname>_record_count = 1) then
previous_item;
else
app_folder.event(‘KEY-PREV-ITEM’);
end if;
if (:parameter.<blockname>_record_count = 1) then
previous_item;
else
app_folder.event(‘KEY-PREV-ITEM’);
end if;
KEY-NEXT-ITEM
if (:parameter.<blockname>_record_count = 1) then
next_item;
else
app_folder.event(‘KEY-NEXT-ITEM’);
end if;
if (:parameter.<blockname>_record_count = 1) then
next_item;
else
app_folder.event(‘KEY-NEXT-ITEM’);
end if;
PRE-BLOCK
app_folder.event(‘PRE-BLOCK’);
app_folder.event(‘PRE-BLOCK’);
POST-BLOCK
app_folder.event(‘POST-BLOCK’);
app_folder.event(‘POST-BLOCK’);
PRE-QUERY
app_folder.event(‘PRE-QUERY’);
app_folder.event(‘PRE-QUERY’);
KEY-EXEQRY
app_folder.event(‘KEY-EXEQRY’);
app_folder.event(‘KEY-EXEQRY’);
POST-QUERY
app_folder.event(‘POST-QUERY’);
app_folder.event(‘POST-QUERY’);
PROMPT Block:
Create new block (PROMPT) which will contain prompts for the column displayed in upper block. This block should contain:
Items which will be Prompts for above block columns (Item name should be same as Column name in above block). Prompt Items should be on Stacked canvas (PROJECT_STACK).
Item Name: FOLDER_OPEN, Item Type: Button, Canvas: PROJECT_FOLDER
Item Name: FOLDER_DUMMY, Item Type: Text Item , Canvas: TOOLBAR
Item Name: FOLDER_TITLE, Item Type: Display Item, Canvas: PROJECT_FOLDER
Item Name: ORDER_BY1, Item Type: Button, Canvas: PROJECT_STACK
Item Name: ORDER_BY2, Item Type: Button, Canvas: PROJECT_STACK
Item Name: ORDER_BY3, Item Type: Button, Canvas: PROJECT_STACK
Create new block (PROMPT) which will contain prompts for the column displayed in upper block. This block should contain:
Items which will be Prompts for above block columns (Item name should be same as Column name in above block). Prompt Items should be on Stacked canvas (PROJECT_STACK).
Item Name: FOLDER_OPEN, Item Type: Button, Canvas: PROJECT_FOLDER
Item Name: FOLDER_DUMMY, Item Type: Text Item , Canvas: TOOLBAR
Item Name: FOLDER_TITLE, Item Type: Display Item, Canvas: PROJECT_FOLDER
Item Name: ORDER_BY1, Item Type: Button, Canvas: PROJECT_STACK
Item Name: ORDER_BY2, Item Type: Button, Canvas: PROJECT_STACK
Item Name: ORDER_BY3, Item Type: Button, Canvas: PROJECT_STACK
Form Level Triggers
FOLDER_ACTION
—
— Remove the message and uncomment the line after it
— to activate the folder actions
—
— message(‘You must modify the FOLDER_ACTION trigger in your form!’);
app_folder.event(:global.folder_action);
FOLDER_ACTION
—
— Remove the message and uncomment the line after it
— to activate the folder actions
—
— message(‘You must modify the FOLDER_ACTION trigger in your form!’);
app_folder.event(:global.folder_action);
WHEN-NEW-FORM-INSTANCE
app_folder.define_folder_block(‘BLOCKNAME’, — ‘Object Name’
‘BLOCKNAME’, — ‘folder_block’,
‘PROMPT’, — ‘prompt_block’,
‘PROJECT_STACK’, –‘stacked_canvas’,
‘PROJECT_FOLDER’, –‘window’,
NULL); –‘disabled functions’);
app_folder.define_folder_block(‘BLOCKNAME’, — ‘Object Name’
‘BLOCKNAME’, — ‘folder_block’,
‘PROMPT’, — ‘prompt_block’,
‘PROJECT_STACK’, –‘stacked_canvas’,
‘PROJECT_FOLDER’, –‘window’,
NULL); –‘disabled functions’);
Comments
Post a Comment