A 1: U O F: Ppendix Sing Racle Orms
A 1: U O F: Ppendix Sing Racle Orms
Overview
Running PRO*Resort
Querying
Forms Navigation
Table of Contents
A1.1 Overview
Purpose of this document
To provide end-users with a basic guide to using standard function keys and menus
available in applications implemented using Oracle Forms.
This chapter provides an important overview of Oracle Forms and describes the basic
elements of a typical Application Form.
MenuBar
ToolBar
Form
Block
Item
Record
Button
App Form
Messages
Status
Console
A1.1.1.1 MenuBar
The MenuBar contains a list of Pull Down Menus. These are used to
navigate between the various screens and reports that make up the
application.
By using this section of the screen you can move through the menu
options to the screen or report you require.
To select an option from the menu move the cursor and click on that
option to take you to that screen.
Alternatively you can use the keyboard to select a Menu and then a
menu item by typing ALT + the underlined character in the menu/option
name.
A1.1.2.1 Block
A Block consists a group of related Items or fields on a form. A Block
typically represents a database Table.
A1.1.2.2 Record
A single row selected from a database table and displayed as a set of
Items.
A1.1.2.3 Item
An area within a Block on the screen (usually highlighted) that can
display a value or accept an input value. An Item normally represents a
column from a database table.
A1.1.2.4 Button
A button is displayed as a graphical ‘push-button’ that triggers an action
such as starting a search or updating a record.
Error text consists of an error number and a brief message regarding the
error that occurred.
Record x/y Shows current record position with the set of records for
current query
The Application Main Menu screen should now be displayed, along with a session details
window which displays information about your current session.
If there are no changes pending you will be returned to the operating system.
If there were uncommitted changes to the database, you will be prompted to commit any
changes before quitting. If you were in an editor or in Enter Query modes (described
elsewhere) you must exit the editor or Enter Query mode before you can exit the
application.
The [Help] function key displays a brief help message for the current item. Pressing
[Help] twice may display advanced help information if it is available.
1. You can retrieve all the records entered in a block, regardless of the data they
contain
2. Or, you can retrieve only those records that fit a certain set of criteria.
For example, when you include a check box item as a query criterion, Oracle Forms
retrieves any records associated with the check box.
If an item is non-queryable, the operator cannot query or navigate to the item while
in Enter Query mode.
To exclude a radio group or text-list style list item, deselect the selected
value. To exclude a pop-list style list item, select the “blank” value.
For a full description of using Check Box, Radio Button, List and
Text items, see the section entitled “Interacting With Screen Items”.
• Block to block
• Record to record
• Field to field
When you move the cursor block to block, your movement is cyclical. For example, when
you get to the last block of the form and press [Next Block] Oracle Forms takes you back
to the first block. Similarly, if you press [Previous Block] while positioned on the first
block of the form, the cursor moves to the forms’ last block.
You can also use [Up] and [Down] to move through the current set of records. The
difference being that as the records change, the cursor remains in the current field,
whereas with [Next Record] and [Previous Record] the cursor moves to the first field in
the block.
The order in which the cursor moves from one field to another is determined by the forms’
designer. If a field’s value is invalid, Oracle Forms will not allow the cursor to leave the
field until you have corrected the value. For example, if a field requires a numerical value
between 100 and 9999, the cursor cannot leave the field when the value is, for example,
99 or 10000.
If the designer has given a field the autoskip attribute, the cursor leaves the field after you
have entered a character in the last field position. The autoskip feature is used to
minimise keystrokes for fields that require a standard number of characters, such as the
field for a post-code.
When working in a field, use [Left] to move the cursor one position to the left and use
[Right] to move the cursor one position to the right.
A field can be shorter than the corresponding table column. Thus, a field can be shorter
than the value it contains. When this occurs you will not see the entire content of the
field. However, Oracle Forms allows you to move the value back and forth within a field
so you can see the entire value. This is called “horizontal scrolling”. Horizontal Scrolling
can be achieved by using the [Scroll Left] and [Scroll Right] actions, or by holding the
cursor over the beginning (scroll left) or end (scroll right) of the input field with the left-
hand mouse button permanently depressed.
Objects: Items:
• Alert • Button
• Editor • Check Box
• List Of Values • Image
• List Item
• Radio Group
• Text Item
The Objects relate to windows, menus etc, whilst Items tend to relate to a single item
within a block, which typically relates to a single column within the underlying database
table.
A1.5.1 Alert
An alert is a modal window that displays a predefined message to bring your attention to
some condition that has resulted from one of your actions.
When an event occurs that causes an alert to display, you must respond to the alert
message by selecting one of the predefined alert buttons.
The alert window appears in the centre of the screen and overlays a portion of the current
display. An alert can have up to three buttons. Selecting any alert button dismisses the
alert.
A1.5.2 Editor
An editor is a modal window that provides text editing functions for a specific text item.
When the default text editor is invoked, Oracle Forms automatically sizes the window to
suit the underlying text field in the database.
To invoke the Editor, place the cursor in a Text Item field, and, select Edit->Edit from the
Default Menu.
Which displays:
Click OK button
Accept the modifications
Or press [Accept]
As in other editors, you can toggle between inserting and replacing characters by
pressing the [Insert/Replace] key. The status line shows if characters are being replaced
or inserted. When inserting characters, each typed character appears before the cursor.
The character currently at the cursor and all following characters are moved to the right.
When replacing characters, each character the operator enters replaces the character at
the cursor. The characters after the cursor do not move.
An LOV is displayed either in response to the [List of Values] key, or automatically when
the cursor enters a particular field in the block.
Once displayed, the LOV remains in focus until it is dismissed either by selecting a value
and clicking the OK button, or by clicking the Cancel button.
If a field has a List Of Values associated with it, “List Of Values” displays in the Message
Line. Selecting Edit->Display List from the Default Menu will display the LOV on screen.
Search for a specific value Click on the Find field and then enter your search
(across all columns) criteria. To execute your search click on the Find
button
Auto-reduce the list of values Type the letters of the word or words you want to
(first column only) search for in the List pane. Oracle Forms auto-
reduces the list of values to those values from the
first column that match your selection criteria. Note
that pressing [backspace] returns you to any
previous auto-reduction criteria
A1.5.4 Button
A button allows you to make a choice or set a switch.
Iconic buttons are typically displayed as squares with an image inside that hints at the
button’s action. Iconic buttons are usually found in Toolbars.
Textual buttons are typically displayed as rectangles with a text label inside that
describes the button’s action.
Iconic
Buttons
Textual
Buttons
Mouse:
Click on the required button.
Keyboard:
Navigate to the required button (usually with the tab key) and then press [Select] (usually
by pressing the space bar) to execute the button.
Default Menu:
Select Field->Next or Field->Previous to navigate to the required button. Press [Select]
to execute the button.
Check
Boxes
Mouse:
Click on the desired check box. Clicking you mouse toggles the check box state between
checked and unchecked.
Keyboard:
Navigate to the desired check box and press [Select] to toggle the check box.
Default Menu:
Select Field->Next or Field->Previous to navigate to the desired check box. Then press
[Select] to toggle the check box.
A text-list item appears as a list of choices. Only one value can be selected at a time.
List Item
Mouse:
To select a value from a pop-list item, click on the pop-list icon to display a list of choices,
drag the mouse to scroll up or down to the desired value, and then release the mouse
button to make your selection.
Keyboard:
Navigate to the list item (pop-list only) and then press [Select] to display the list of
choices. Press [Up] or [Down] to scroll through the choices. Press [Select] to select a
value.
If the default entry in the field is a blank, it will be at the bottom of the list of values.
Therefore, [Down] will not display any new entries, but [Up] will.
Like the buttons on a radio, a radio group only allows one selection at a time. Selecting
one button from the group automatically deselects all other buttons in the group.
Radio buttons appear as empty circles with text labels to the right of each radio button.
When you select a radio button, the circle goes black (or otherwise changes visually) to
indicate that it has been selected.
Radio
Group
Mouse:
Click on the desired radio button.
Keyboard:
Navigate to the radio button group and then press [Right] or [Left] to toggle between the
different radio buttons. To select a radio button, press [Select] (Usually by pressing the
space bar).
Text Item
An Oracle Forms editor can be invoked from any text item by selecting Edit->Edit from
the Default Menu. (See the section labelled “Editor” for details.) Text items are accessed
by any of the following methods –
Mouse:
To scroll through a multi-line text field, use the scroll bars if provided.
Keyboard:
To scroll through a multi-line text field, press [Up] or [Down] to scroll up or down one line
at a time. To activate an Editor, navigate to the desired text item and then press [Edit].
Default Menu:
To activate an Editor, navigate to the desired text item and then press Edit->Edit.
There are several text item properties that can affect how text behaves in an
application:
• If a text item requires a value, you will not be able to navigate out of the item until you
have entered a correct value or pressed [Clear Block].
• If an item is non-editable, you will not be able to navigate to the item.
• Similarly, if an item is non-queryable, you will not be able navigate to the item when
the form is in Query Mode.
1. Press [Next Block] or [Previous Block] until your cursor is positioned in the correct
block
2. Press [Enter Query]
3. Type the values you want to match into the appropriate fields
4. Press [Execute Query]
5. Press [Next Record] or [Previous Record] to view the retrieved records.
You can also select records where a value fits a certain pattern. To do
this, enter a value into field where “_” represents any character and “%”
represent any combination of characters (including no characters).
In the above screen shot we are searching for all Employees whose
surname begins with “K”.
Rather than entering an exact data value, you can enter a relational operator before the
data value in one or more fields. The following table shows relational operators and how
you can use them.
In this screen shot we are searching for all Employees whose Employee Number is
greater than 200.
= equal to = ‘SMITH’
!= not equal to != 19.5
> greater than >100.00
>= greater than or equal to >=2000
< less than <’DAVIS’
<= less than or equal to <=100.00
BETWEEN between two values #BETWEEN 100 AND 110
Fields containing character or date values must be enclosed by single quotes. Also,
whenever you use a relational operator that is a word (such as BETWEEN) in a field, you
must precede the operator with a “#”.
To use the WHERE clause, you must place a variable in one or more fields. The
variable, which serves as a placeholder, is preceded by a colon (:). By placing a variable
in a field, you signal that you want to enter a WHERE clause using the value in that field.
The first character of the variable name itself is alphabetic, and any following characters
are alphabetic, numeric or the special characters “_”, “$” or “#”.
In this example we have entered “:DEPT” in the Dept Number field, when we execute the
query Oracle Forms automatically displays a Query/Where dialog where we can add the
SQL WHERE clause to the standard search. In this instance we are searching for all
Employees who work for departments 99, 31 or 7.
Purpose Examples
To retrieve records that have a value:
Greater than (>) :EMPNO > 106
Greater than or equal to (>=) :EMPNO >= 100
Less than (<) :DEPT < 305
Less than or equal to (<-) :DEPT<=100
Equal to (=) :EMPNO = 106
Not equal to (!=) :NAME != ‘SMITH’
The following is the general procedure for using complex search criteria:
1) Press [Enter Query]
2) For each field involved, enter a variable (a letter or short word works
well)
3) Press [Execute Query] to display the Query/Where dialogue box
4) Enter an expression that describes the search criteria, using
placeholders similar to the ones in Step 2
For example:
Search Criteria Value Entered
Order ID greater than 615 or :ID > 615 OR
Client Name is JUST TENNIS :X = ‘JUST TENNIS’
If you leave placeholders in any field, and then press [Enter Query] twice,
Oracle Forms redisplays those placeholders in the field in which you
entered them. Then press [Execute Query] to display the last response
entered in the Query/Where dialogue box. You may use the response as
is by pressing [Next Field], or you may edit, replace, or remove it.
Oracle Forms counts the records that meet the search criteria and
displays the number on the message line.
After you press [Count Matching Records], you have the following
options:
• Press [Execute Query] to perform the query
• Enter other search criteria
• Press [Exit/Cancel] to exit Enter Query mode without executing a
query.
Using SQL, you can enter a WHERE clause that has several conditions.
For example you could:
1. Press [Enter Query], then place the variable :DEPT in the Dept No
field and the variable :EMPNO in the Employee No field.
2. Press [Execute Query] and enter the following condition in the
Query/Where dialogue:
:DEPT >=1 AND :EMP >300 ORDER BY :EMPNO
This SQL statement will retrieve all the records that have both a
Department ID greater than 1 and an Employee No greater than 300.
The records will be ordered by Client ID.
1. Insert Mode
When Insert mode is active, each character you enter appears at the cursor. The
character currently at the cursor and all following characters are moved to the right.
2. Replace mode
When Replace mode is active, each character you enter replaces the character at the
cursor. The characters after the cursor do not move.
You can switch between Insert mode and Replace mode by pressing [Insert/Replace].
Once set, the mode remains active until you change it by pressing this key again. (The
status line displays the current mode).
To delete a character, place the cursor on the character and press [Delete Character].
[Delete Character] functions in the same manner whether insert or replace mode is
active. (When the cursor is after the last character in a field, [Delete Character] has no
effect.)
If you want to delete the character before the cursor, press [Delete Backward].
• Committing a transaction
• Rolling back a transaction
• Using automatic record locking
Note that while modifications are held in your work space, other database users can’t see
them. Therefore, if another user fetches a row after you have modified it, but before you
have committed it, that user will see the unmodified version of the row.
Press [Next Field] to reach the response you want and press [Select] to
choose it (or click on the appropriate button).
The following operations will prompt you with the above alert if there are
changes to commit:
• [Enter Query]
• [Execute Query]
• [Exit / Cancel]
• [Clear Block]
• [Clear Form / Rollback]
• [Count Matching Records]
If any record in the work space fails to pass a validity check, the
entire commit operation fails; nothing in the work space is committed.
You must correct the error and commit again.
Note that you can use [Clear Block] to clear the part of the work space that holds records
for the current block.
Under certain circumstances, you may want to lock a record before automatic locking
takes place. (For example, you may want to lock an order while you modify its item
lines). If you need to lock a record before automatic locking takes place, press [Lock
Record].
A1.9 Toolbars
This section describes the various toolbars used in this application
Save
Print
Print Setup
Exit
Cut
Copy
Paste
Enter Query
Execute Query
Cancel Query
Previous Block
Previous Record
Next Record
Next Block
Insert Record
Delete Record
Lock Record
Help
Save
Closes the current dialog box if there is one
OR
Enters into the database all changes made since the last [Accept] or [Clear Form].
Print
Writes the current screen to a file and asks if you want to print it.
Print Setup
Choose which printer to print to OR
Reconfigure the printer from within the present application.
Exit
Exit the current application.
Cut
Removes an area of text after it has been selected and stores it in the paste buffer.
Copy
Copies area of text that has been selected and stores it in the paste buffer.
Paste
Pastes text in paste buffer into current cursor location.
Enter Query
Clears the current block and allows you to enter query criteria.
When used after [Enter Query], [Execute Query] executes a query with the criteria you
have specified.
Execute Query
Clears the current block and retrieves all the records from the database table referenced
by the block. (Only those records that can fit on the screen are displayed.)
When used after [Enter Query] [Execute Query] executes a query with the criteria you
have specified.
Cancel Query
Abandon the current query, and change the display mode back into ‘view’ mode.
Previous Block
Move the cursor into the previous block on the current screen.
Previous Record
Move the cursor to the previous record in the current block, or load the previous record
from the result set into the current screen.
Next Record
Move the cursor to the next record in the current block, or load the next record from the
result set into the current screen.
Next Block
Moves the cursor to the next block in the form that contains at least one enterable field.
(The order is established by the form designer.)
Insert Record
Clear the current screen, and use it to enter the details of a new record. Once all the
details are complete, press the Save button to store the new record in the database.
Delete Record
Remove the current record from the database.
Lock Record
Locks a record so that another user cannot change the records while you are updating it.
[Lock Record] does not allow you to enter or change any data in a field that is protected
against entry or update.
Help
Displays a brief help message for the current field. Pressing [Help] twice may display
advanced help information if available for that field.
Accept / Commit / Save F10 Closes the current dialogue box if there is one.
OR
Enters into the database all changes made since the
last [Accept] or [Clear Form].
Block Menu F5 Displays a list of all the blocks in the current form.
From this list, select the required block.
Clear Block Shift + F5 Clears all records from the current block and creates
a new record. [Clear Block] prompts for changes to
be committed.
Clear Field Ctrl + u Clears the contents of the current field beginning at
the current cursor position. If the cursor is to the right
of all the characters in the field, [Clear Field] clears
the field.
Clear Form/Rollback Shift + F7 Clears all the blocks of the current form, deletes all
data in all blocks of the form, and does a rollback.
[Clear Form] prompts for changes to be committed.
Clear Record Shift + F4 Removes the current record from the current block,
reversing any uncommitted changes made to that
record. A cleared record is NOT deleted from the
database.
Copy Text Ctrl + c Copies area of text that has been selected and stores
Count Matching Shift + F2 Clears the current block and displays on the message
Records line the number of rows that a query would retrieve if
executed.
Cut Text Ctrl + x Removes an area of text after it has been selected
and stores it in the paste buffer.
Delete Backwards Backspace Deletes the character to the left of the current cursor
position.
Delete Backwards Delete Deletes the character to the left of the current cursor
position.
Delete Record Shift + F6 Deletes a retrieved record from the screen and from
the database. Records are not permanently deleted
until changes are committed to the database.
Down DownArrow Moves the cursor to the same field in the next record.
Down Ctrl + l Moves the cursor to the same field in the next record.
Duplicate Field/Item F3 Copies the field value from the same field of the
previous record in to the current field.
Duplicate Record F4 Copies all field values from the previous record in to a
new record.
Execute Query F8 Clears the current block and retrieves all the records
from the database table referenced by the block.
(Only those records that can fit on the screen are
displayed.)
Exit/Cancel Query Ctrl + q Exits the current form and returns to the system
command prompt. [Exit / Cancel] also terminates
query processing or interrupts the [List of Values]
function.
Type (1)
If a pop-up window appears, the window will display
an editable field and list of possible values for the
current field. Press [Next Field] to move the cursor to
the editable field, enter search criteria, and press [List
of Values]. SQL*Forms executes the selection and
returns the cursor to the list.
Type (2)
If nothing pops up when [List of values] is pressed,
that field will display possible values for the current
field. Press [Next Field] to see subsequent values.
Press [Exit / Cancel] to select a value.
New Record F6 Clear the screen, and use it to enter details of a new
record
Next Field / Item Ctrl + Tab Moves the cursor to the next editable field in the
current record. (The order is established by the form
designer.)
Next Field / Item Tab Moves the cursor to the next editable field in the
current record. (The order is established by the form
designer.)
Next Primary Key Shift + F3 Moves the cursor to the next editable field in the
current record that has been designated as part of the
“primary “key – those fields that uniquely identify a
particular row of a database table.
Next Record Shift + Moves the cursor to the next record in the current
DownArrow block. If no more records are found, [Next Record]
creates a new blank record (unless the current record
is blank).
Next Record PageDown Moves the cursor to the next record in the current
block. If no more records are found, [Next Record]
creates a new blank record (unless the current record
is blank).
Next Set of Records Ctrl + > Retrieves the next set of records (a number specified
by the designer) into the current block from records
that satisfy an active query.
Paste Text Ctrl + v Pastes text in paste buffer at current cursor location.
Previous Field / Item Shift + Ctrl + Moves the cursor to the previous editable field in the
Tab current record. (The order is established by the form
designer.)
Previous Field / Item Shift + Tab Moves the cursor to the previous editable field in the
current record. (The order is established by the form
designer.)
Previous Record Shift + Moves the cursor to the previous record in the current
UpArrow block.
Previous Record PageUp Move to the previous record in the result set.
This will either scroll the cursor up through a list or
refresh the current record in the current block
Print Shift + F8 Writes the current screen to a file and asks for printing
confirmation.
Return Enter Transmits and validates data but does not commit the
data to the database.