Querying Records in a Folder
A main advantage of a folder block is that you can customize it to display only the records you want to see. You can easily alter the query criteria for a folder and save that criteria with a folder. You can also control the sorting order of the records you display in a multi-record folder.
To define query criteria for a folder:
1. Run the query you want, either by using Query Find or query-by-example.
2. Choose Save As from the Folder menu if you want to save this query criteria in a folder.
3. Enter a name for the folder.
4. Select Always, Never, or Ask Each Time from the Autoquery Option Group. If you select:
||The query will be automatically performed each time you open the folder.
||The query will be saved with the folder, but will not automatically run when you open the folder.
|Ask Each Time
||You will be prompted when you open the folder to decide if you would like the query to be performed immediately.
5. Choose OK when you are done.
Attention: When you save a folder, the query criteria gets "locked in" to the folder. When you perform another query on that same folder, your new query will only be performed on the subset of records retrieved by the folder. If you want to perform a new query-by-example on the complete set of records, you need to first reset the query for the folder definition before performing another query.
To view the query criteria for a folder:
- Choose View Query from the Folder menu.
A window titled Folder Contents appears. The window may contain a SQL WHERE clause that defines the criteria used to retrieve the subset of records displayed in the current folder. An empty window indicates that there is no special query criteria and that the current folder retrieves all records for the folder entity.
To reset the query criteria for a folder:
1. Choose Reset Query from the Folder menu.
This clears the WHERE clause from the current folder, but retains the current folder name and its field layout.
2. Perform another query and choose Save from the Folder menu to save the new query to your current folder.
To alter the sorting order of data in a multi-record folder:
1. Choose Show Order By from the Folder menu.
This menu item acts as a toggle switch to display the Order By buttons for the first three fields that can be 'ordered by' of a multi-record folder block. The Order By buttons appear beneath the first three fields in the block.
2. Select an Order By button to switch it to any one of three settings:
- Ascending--sorts the column in ascending order
- Descending--sorts the column in descending order
- Unsorted--does not sort the column
These settings determine how the folder sorts the records it displays. The folder applies these settings from left to right when it retrieves and sorts the records.
3. Choose Run from the Query menu to rerun the query in your folder to apply any changes of ordering to the records.
Figure 1 - 47.
- Suppose you want to create a folder definition called Unposted Batches in the Enter Journals folder block of your Oracle General Ledger application, as shown in Figure 1 - 47. You want this folder definition to automatically display unposted batch records. First choose Show Field... from the Folder menu to show the Batch Status field, if it is not already displayed. Next, choose Enter from the Query menu to perform a query-by-example. Enter the value Unposted in the Batch Status field, then choose Run from the Query menu to retrieve all unposted batch records.
Choose Save or Save As... from the Folder menu to save this query criteria and layout. Enter a unique name to identify the folder. Make sure to set the Auto Query option group to the desired behavior. You can also choose View Query... from the Folder menu at any time to display the WHERE clause for this query in the Folder Contents window.
Using the Folder Tool Palette
Customizing the Layout of a Folder
Managing Folder Definitions