In oracle Applications' GUI includes unique features to enhance the
productivity of Oracle's application users. Folder is one the features,
that enhance the feature for high productivity.
What is Folder..
As per documentation is say .."
A folder is a special kind of
window that allows users to customize the set of fields and records
displayed for a particular business entity without programming. Using
the folder customization menu or tool palette, users can specify the
records and the fields they wish to see, as well as field sequence,
field prompts, and field display widths. Users can customize folders at
any time, saving them for personal use or sharing them with others."
The most common use of folder technology is in the gateway to a key
applications entity. Users can customize the folder window to display
the set of fields and records that are most relevant to the business at
hand. From the folder window, users can perform an action involving one
or more of the returned records. Or, they can select a single record,
open a detail window that shows all the fields for that record, and
perform an action involving that record.
Here are the 9 steps to enable folders in custom forms.
These Changes will make sure that folder can be saved and its query criteria are also saved.
1. Pick up Template.fmb from your $AU_TOP/resource directory on server where forms are residing.
2. Check out all the libraries get loaded successfully along with the Template.
3. Check for APPDAYPK.pll loaded fine, else copy it from APPSTAND.fmb
4. Attach APPFLDR library/pll
APPFLDR can be found in $AU_TOP/Resource directory on server where forms are residing.
5. Copy the STANDARD_FOLDER Object Group
STANDARD_FOLDER Object group can be referenced from APPSTAND form
which resides in $AU_TOP/Resource. This will also copies the dependent
objects required for object group.
This will copy Folder Related Blocks,Canvases and other necessary objects.
6. Let us say we have One Main block, Not concerned with Control BlocksMain Block:
XXPH_RCPT_HIS then
Create <BLOCKNAME>_RECORD_COUNT parameter
as XXPH_RCPT_HIS_ 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 XXPH_RCPT_HIS_CONTENT and stacked canvas as
XXPH_RCPT_HIS_STACKED. Both the canvas have same window.
Windows
Create One Window. Name it XXPH_RCPT_HIS_WIN with view name as XXPH_RCPT_HIS_WIN
Blocks Main Block:
XXPH_RCPT_HIS contains database columns. Items should be on Stacked canvas (XXPH_RCPT_HIS_STACKED).
7. Create following eight triggers:
WHEN-NEW-BLOCK-INSTANCE app_folder.event('WHEN-NEW-BLOCK-INSTANCE');
KEY-PREV-ITEM if (:parameter.XXPH_rcpt_his_record_count = 1) then
previous_item;
else
app_folder.event('KEY-PREV-ITEM');
end if;
KEY-NEXT-ITEM if (:parameter.xxph_rcpt_his_record_count = 1) then
next_item;
else
app_folder.event('KEY-NEXT-ITEM');
end if;
PRE-BLOCK app_folder.event('PRE-BLOCK');
POST-BLOCK app_folder.event('POST-BLOCK');
PRE-QUERY
app_folder.event('PRE-QUERY');
KEY-EXEQRY app_folder.event('KEY-EXEQRY');
POST-QUERY app_folder.event('POST-QUERY');
8. PROMPT Block:
Create new block XXPH_RCPT_HIS_PROMPT: which will contain prompts for the column displayed in upper block.
Make subclass information as DYNAMIC_PROMPT.
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 (XXPH_RCPT_HIS_STACKED).
Create new Items specified below:
Item Name: FOLDER_OPEN, Item Type: Button, Canvas: XXPH_RCPT_HIS_CONTENT,Subclass:Dynamic_Title
Item Name: FOLDER_DUMMY, Item Type: Text Item , Canvas: TOOLBAR ,Subclass:Folder_Dummy
Item Name: FOLDER_TITLE, Item Type: Display Item, Canvas: XXPH_RCPT_HIS_CONTENT,Subclass:Dynamic_Title
Item Name: ORDER_BY1, Item Type: Button, Canvas: XXPH_RCPT_HIS_STACKED
Item Name: ORDER_BY2, Item Type: Button, Canvas: XXPH_RCPT_HIS_STACKED
Item Name: ORDER_BY3, Item Type: Button, Canvas: XXPH_RCPT_HIS_STACKED
Item Name:Folder_Switcher, Item Type:Text,Canvas: XXPH_RCPT_HIS_CONTENT,Subclass:SWITCHER
Check out your Both Canvases for setting these new buttons,prompts.
9. 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);
WHEN-NEW-FORM-INSTANCE
app_folder.define_folder_block(' XXPORCHUK ', -- 'Object Name'
' XXPH_RCPT_HIS ', -- 'folder_block',
' XXPH_RCPT_HIS_PROMPT ', -- 'prompt_block',
'XXPH_RCPT_HIS_STACKED', --'stacked_canvas',
'XXPH_RCPT_HIS_WIN', --'window',
NULL); --'disabled functions');
Oracle has provided Folder forms for ease of use. Oracle users can
use folders to set the look and feel as per their need and comfort. They
can also set folders to query data based on certain criteria.
We shall use the Payables Invoice form to demonstrate how to use folder forms.
Open payables Invoice form.
Note that the menu has the item Folder,

, and this icon,

. Clicking on the icon opens the
Folder Tools window. It looks like the following,
Clicking on
Folder item on the menu brings up the items as shown below,
Both options have the same functionalities. The only difference is
the former option is GUI based whereas the latter is non GUI based.
Let us review the fields on the form.
The top left icon,

, denotes the folder icon. Clicking on this button pulls up the available folders for this form.
We can select any available folder. The folder
AP Invoice Entry is set as the default folder for this responsibility and so this folder opened on clicking on the form.
Let us now change some field positions.
We shall move the field,
Date invoice Received, to the right of
Invoice Amount. You can drag and drop the field or you can use the
Folder Tools window or
Folder menu item. On rearranging the fields it looks like this,
Now we shall query for some Invoices. Query criteria are the following,
Type = Standard
Invoice Date > 01-jan-2012
Supplier Name like A%
Enter the criteria after hitting F11.
Click on Ctrl+F11 to execute the query.
Now the records are queried. Click on Folder > View Query
The search criteria are saved internally by Oracle. If we create a
new folder then the look and the search criteria will be saved as
attributes of the folder.
To create a new folder you can click on this icon,

, on Folder Tools window or Folder > Save as item on the Folder menu.
We need to give the folder a new name. Let us name it as
XX AP Invoice query folder.
- Select the option, Ask each time, as we want Oracle to ask the user whether he/she wants the folder to open and query for the records automatically.
- Check the box, Include Query, so that the same query criteria is saved on the folder.
- Select, Open as Default, to make the folder the default folder.
- Select, Public, so that all users who have access to this form will have access to this folder as well.
Click on
Show Query button to review the query that will be saved.
Review the query and then click on OK button to go back to the previous form. Click on OK on that form.
Click on OK again.
Now this folder becomes your default folder. Close the Invoice form.
Open the Invoice form.
The invoice form opens and asks the user whether Oracle should query
for the records based on the folder query. We shall select “
No” so that Oracle does not query for the records.
Now we want to query for Invoices whose Supplier names start with B. In query mode we enter,
Then we shall execute the query. No rows are returned as one of the
search criteria of the folder query is that the supplier names must
start with A.
We can still query for the supplier names starting with B. First we
need to remove the query on the form. Click on F4 to leave Enter Query
mode. Now click on Folder > Reset Query.
A popup message is displayed. Click on OK button. Now click on F11 to
go into query mode and enter the search criterion as we had done
earlier.
Execute the query by clicking on Ctrl+F11.
Now the folder returns Invoices with the search criterion.
In this article we discussed how to use Folder functionality. In
another article we shall discuss how folders can be administered.