0% found this document useful (0 votes)
168 views47 pages

A 1: U O F: Ppendix Sing Racle Orms

The document provides an overview of using Oracle Forms for the PRO*Resort application. It describes the basic screen elements including the menu bar, toolbars, forms, blocks, records, items, buttons, and messages. It explains how to run the application, execute queries, navigate between different parts of the form, interact with screen items, retrieve and modify records in the database, and use common functions like committing transactions. Standard function keys and toolbars are also outlined. The document serves as a user guide for navigating and utilizing the key features within the PRO*Resort application built with Oracle Forms.

Uploaded by

Masood Mohd
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views47 pages

A 1: U O F: Ppendix Sing Racle Orms

The document provides an overview of using Oracle Forms for the PRO*Resort application. It describes the basic screen elements including the menu bar, toolbars, forms, blocks, records, items, buttons, and messages. It explains how to run the application, execute queries, navigate between different parts of the form, interact with screen items, retrieve and modify records in the database, and use common functions like committing transactions. Standard function keys and toolbars are also outlined. The document serves as a user guide for navigating and utilizing the key features within the PRO*Resort application built with Oracle Forms.

Uploaded by

Masood Mohd
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

PRO*Resort v5 Operators Manual Using Oracle Forms A1-1

APPENDIX 1: USING ORACLE


FORMS

Overview

Running PRO*Resort

Querying

Forms Navigation

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-2

Table of Contents

Appendix 1: Using Oracle Forms


A1.1 Overview........................................................................................................... 4
A1.1.1 Basic Screen elements.................................................................................... 4
A1.1.2 Form Layout................................................................................................... 6
A1.1.3 The Work Space.............................................................................................. 7
A1.2 Running the Application.................................................................................... 8
A1.2.1 Starting the Application.................................................................................... 8
A1.2.2 Quitting the Application.................................................................................... 9
A1.2.3 Getting Help................................................................................................... 10
A1.3 Executing a Query............................................................................................ 11
A1.3.1 When to Query the Database........................................................................ 11
A1.3.2 Retrieving All Records................................................................................... 12
A1.3.3 Including Screen Items in Queries................................................................. 14
A1.4 Moving Around The Form................................................................................. 15
A1.4.1 Moving from Block to Block........................................................................... 15
A1.4.2 Moving from Record to Record...................................................................... 16
A1.4.3 Moving from Field to Field............................................................................. 17
A1.5 Interacting with Screen Items ........................................................................... 18
A1.5.1 Alert............................................................................................................... 18
A1.5.2 Editor............................................................................................................. 19
A1.5.3 List of Values................................................................................................. 21
A1.5.4 Button............................................................................................................ 23
A1.5.5 Check Box..................................................................................................... 24
A1.5.6 List Item......................................................................................................... 25
A1.5.7 Radio Group.................................................................................................. 26
A1.5.8 Text Item........................................................................................................ 27
A1.6 Retrieving Selected Records............................................................................ 28
A1.6.1 Matching Exact Values.................................................................................. 28
A1.6.2 Entering Variable Conditions......................................................................... 30
A1.6.3 Using the SQL WHERE Clause for Advanced Queries................................. 31
A1.6.4 Using the WHERE Clause In Additional Ways.............................................. 32
A1.7 Modifying Data in the Database........................................................................ 35
A1.7.1 Replacing, Inserting, and Deleting Characters.............................................. 35
A1.7.2 Inserting and Deleting a Record.................................................................... 36
A1.8 Forms Processing............................................................................................. 37
A1.8.1 Committing a transaction............................................................................... 37

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-3

A1.8.2 Rolling Back a Transaction............................................................................ 39


A1.8.3 Using automatic record locking...................................................................... 40
A1.9 Toolbars............................................................................................................ 41
A1.9.1 The Standard Forms Entry Toolbar............................................................... 41
A1.10 Standard Function Keys................................................................................. 44

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-4

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.

A1.1.1 Basic Screen elements


Here is a typical PRO*Resort screen showing the various parts of an Oracle Form.

MenuBar

ToolBar

Form

Block

Item

Record

Button

App Form

Messages

Status

Console

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-5

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.

A1.1.1.2 The Menu Options


Each pull down many will have within it either further submenus or a list
of Menu Options.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-6

A1.1.2 Form Layout


Oracle forms are composed of one or more Blocks, which may contain one or more
Records. Each record is displayed as a set of Items . Users can then navigate between
Blocks on a screen, or between records in a Block, or between Items within a Record.

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.

A1.1.2.5 Messages Line


The message line displays both Oracle Forms messages and
application-specific messages, such as hint text and error text.

Hint text either informs you of some course of action or displays


information about the currently pointed-to menu option or input field.

Error text consists of an error number and a brief message regarding the
error that occurred.

A1.1.2.6 Status Line


Displays the following information from left to right:

Record x/y Shows current record position with the set of records for
current query

Enter-Query Indicates that the operator is in Enter Query mode.

For a more detailed description of the various screen elements


please refer to the section entitled “Interacting with Screen Items”.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-7

A1.1.3 The Work Space


Oracle forms do not work with database table directly. They work with copies of them
that are kept in a Work Space. This arrangement protects you from making mistakes;
you can make a change to the Work Space and then discard it. If you discard the
changes, the table itself will not be affected.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-8

A1.2 Running the Application


This chapter explains the general procedures for running an application, getting help and
exiting an application.

A1.2.1 Starting the Application


Double click on the application icon.
You will be prompted to enter the Oracle username, password and database alias.

The Application Main Menu screen should now be displayed, along with a session details
window which displays information about your current session.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-9

A1.2.2 Quitting the Application


You can exit the Oracle Forms application by doing one of the following:

• Selecting Action->Exit or Exit from the MenuBar


• Pressing the [Cancel/Exit] key.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-10

A1.2.3 Getting Help


You can get help by pressing the [Help] function key (F1) or by selecting Help from the
default menu.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-11

A1.3 Executing a Query


This chapter describes using a form to retrieve information from the database. Retrieving
information from the database is called ‘executing a query’. Read this section to learn
when to query the database and how to retrieve all the records available to a particular
form.

A1.3.1 When to Query the Database


You will want to query the database whenever you need to view or verify existing data.

You can enter a query in one of two ways:

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-12

A1.3.2 Retrieving All Records


A1.3.2.1 Selecting a table
To retrieve all the records stored in a table, use the application’s
MenuBar to select the form associated with the table you wish to view.

A1.3.2.2 Executing a query


Next position the cursor in the block associated with the table and press
[Execute Query] or select Query->Execute from the default MenuBar, or
press the appropriate Icon on the ToolBar.

A1.3.2.3 Displaying the results


Although selecting [Execute Query] retrieves all the records stored in a
table, Oracle Forms display only one record at a time. This is because
the Bus Route block is a single-record block, where only one record can
be displayed at a time. The Pickup block, on the other hand, is a multi-
record block; it can display up to 10 records at once. You can scroll
through all the records retrieved even though only a few are displayed at
one time.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-13

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-14

A1.3.3 Including Screen Items in Queries


Oracle forms allows you to include check boxes, radio buttons, list items and text items
as query 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.

A1.3.3.1 Including a check box


Navigate to the check box and then simultaneously press Shift+Click.
Shift+Click toggles the check box between query On or Off.

A1.3.3.2 Including Radio Buttons and List Item Values


Navigate to the item and then select the desired radio button or list item
values.

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.

A1.3.3.3 Including a Text Item


Navigate to the text item and then enter you query criteria.

For a full description of using Check Box, Radio Button, List and
Text items, see the section entitled “Interacting With Screen Items”.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-15

A1.4 Moving Around The Form


As you work with a form, either viewing existing data or entering new records, you will
need to move the cursor from one area of the form to another. This section explains how
to make the following movements with the cursor:

• Block to block
• Record to record
• Field to field

A1.4.1 Moving from Block to Block


To move the cursor from one block to another, use [Next Block] or [Previous Block]

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-16

A1.4.2 Moving from Record to Record


Once you have retrieved records from the database, you can use [Next Record] and
[Previous Record] to view them If the block is a single-record block, only one record is
visible at a time. If the block is a multi-record block, then more than one record is visible,
in which case the record movement keys simply move the cursor from one record to
another.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-17

A1.4.3 Moving from Field to Field


You can move from one field to another by pressing [Next Field] (Tab) and [Previous
Field] (Shift Tab).

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-18

A1.5 Interacting with Screen Items


This chapter describes the following User Interface objects and items:

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.

Typical combinations are:


Yes, No, Cancel
OK, Cancel
OK

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-19

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:

The default text editor uses the following standard keys:

Action to be performed Action to take

Click OK button
Accept the modifications
Or press [Accept]

Click on the Cancel button


Cancel the modifications
Or press [Cancel]

Click on the Search button


Or press [Search]
Search for a value
Enter your search criteria
To execute the search click OK or press [Accept]

Press [Cut] or select Edit->Cut from the default


Cut text
menu

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-20

Press [Paste] or select Edit->Paste from the default


Paste text
menu

Move right Press [Right]

Move left Press [Left]

Move up Press [Up]

Move down Press [Down]

Move to the beginning of the line Press [Beginning of line]

Move to the end of the line Press [End of Line]

Move to the first line Press [First Line]

Move the last line Press [Last Line]

Delete backwards Press [Delete Backward]

Delete character Press [Delete Character]

Delete line Press [Delete Line]

When an editor is active, the set of keys or menu choices available.

Help is not available until the editor is dismissed.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-21

A1.5.3 List of Values


A list of values (LOV) is a scrollable pick list that displays a list of single or multi-column
records from which you can select a single distinct value.

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.

A1.5.3.1 Selecting a List Of Values

A1.5.3.2 Displaying from List Of Values

A List of Values uses the following standard keys:

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-22

Action to be performed Action to take

Select a value Press[Up] and [Down] to scroll through list off


values

Choose a value Double click on the desired value

Choose the highlighted value Click on the OK button


and dismiss the LOV

Dismiss the LOV without Click on Cancel or press [Exit/Cancel]


choosing a value

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

“%” can be used as a wildcard when


searching for specific values across all columns

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

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-23

A1.5.4 Button
A button allows you to make a choice or set a switch.

There are two button styles: Iconic and Textual.

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

Buttons are activated by any of the following methods –

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-24

A1.5.5 Check Box


A check box is an interface item that allows the you to indicate an on or off state by
checking or unchecking a check box. A check box appears as a small, square box with a
text label to the right. When a check box is selected it appears to be checked, usually
with an “X” or a tick. When deselected a check box appears unchecked or blank.

Check
Boxes

The state of a check box is changed by any of the following methods –

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-25

A1.5.6 List Item


A list item is an interface item that displays a predefined list of choices from which a
single value can be selected.

List Items have two display styles: Pop-list and Text-list.


A pop-list item initially appears as a single field (similar to a text item field, but with a
small square button at the right hand end). When you select the pop-list icon, a list of
available choices appears.

A text-list item appears as a list of choices. Only one value can be selected at a time.

List Item

List items are accessed by any of the following methods –

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-26

A1.5.7 Radio Group


A radio group is an interface item that contains a group of mutually exclusive radio
buttons.

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

Radio buttons are activated by any of the following methods –

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).

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-27

A1.5.8 Text Item


A text item displays operator enterable text in a field in either single or multi-line form. A
text item appears as an empty rectangular box or container.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-28

A1.6 Retrieving Selected


Records
This chapter describes several ways to retrieve records that meet specific criteria. After
reading this chapter you will not only know how to execute simple queries that meet
specific criteria, but also complex queries that satisfy several conditions.

The following topics are discuss in this section


• Matching exact values
• Entering variable conditions
• Using the SQL WHERE clause for advanced queries.

A1.6.1 Matching Exact Values


The following are the general steps for retrieving records that match exact values:

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.

A1.6.1.1 A query on an exact match

In the screen above, the user is searching for an Employee whose


Employee Number is 200.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-29

A1.6.1.2 Using Pattern Matches


You can retrieve records using values in two or more fields by moving the
cursor to those fields and entering the values. Oracle Forms will only
fetch those records that meet the search criteria specified in all fields.

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”.

The following list contains examples of pattern matching:

Pattern Possible Matches

JON_S JONES, JONAS, JONOS, JONQS, JON-S


S_AR SMART, SNARE, SHARE, SHARD, SHARP, SHARK
ENTER% ENTER, ENTERS, ENTERED, ENTERTAIN
_N%S BINS, FINES, WINNERS, WINEMAKERS

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-30

A1.6.2 Entering Variable Conditions


Sometimes it is not practical to enter the exact values that you want retrieved records to
match. For example you might want to retrieve the following:

• All employees with an Employee Number greater than 200


• All the tours with an ID of 10 or more
• All the bookings placed in the month of June

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.

Operator Meaning Examples

= 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

These operators do not work in time fields.

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 “#”.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-31

A1.6.3 Using the SQL WHERE Clause for


Advanced Queries
Although you can execute fairly complex queries by entering data values or relational
operators in fields, you may want to execute more advanced queries. You can execute
advance queries through an SQL WHERE clause. The WHERE clause allows you to
express queries based on conditions other than an exact match.

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.

Summary for entering variable conditions


1. Press [Next Block] until your cursor is positioned in the correct block
2. Press [Enter Query]
3. Instead of placing a value into a field, enter a variable name (such as :ID or :DATE)
4. Press [Execute Query]
5. In the Query/Where dialog box, enter the condition you want the retrieved records to
meet
6. Press [Commit/Accept]
7. Press [Next Record] or [Previous Record] to view the retrieved records.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-32

A1.6.4 Using the WHERE Clause In


Additional Ways
Here is a table of additional ways you can use WHERE clauses in queries:

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’

To express a query that can be satisfied (:CODE=100860 OR


by either of two conditions :CODE=100861)

To express a query with two conditions (:TOURDATE = ‘14-JUN-1999’) AND


(:CLIENTID=106)

A1.6.4.1 Using complex search criteria


You can enter queries with search criteria more complex than those
described above. For example, you can select records in which ClientID
has the following values:
• Is one of several values
• 107 or DEPTID is greater than 615 (Entering values into the EMPNO
and DEPTID fields would select records in which EMPNO is 107 and
DEPT is greater than 615)
• 107 and DEPTID is greater than 615 or Sex = “Male”

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’

Order ID less than or equal to 615 or :ID <= 615 OR


Client Name ends with ‘TENNIS’ :X like ‘%TENNIS’

5) Press [Commit/Accept], Oracle Forms analyses the logical


expression entered and executes the query.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-33

A1.6.4.2 Reusing Search Criteria


To reuse search criteria of a previous query in the current block, press
[Enter Query] twice: press it once to initiate a new query and a second
time to redisplay the previous search criteria. You can use the criteria
displayed or modify it before pressing [Execute Query].

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.

A1.6.4.3 Counting Query Records


If you want to know how many records a search will return before actually
executing a query, you need to use [Count Matching Records]. Following
is the general procedure for counting the number of records that meet a
set of search criteria:

1) Press [Enter Query]


2) Enter the search criteria
3) Press [Count Matching Records]
(or select Query->Count Hits from the Default Menu)

Oracle Forms counts the records that meet the search criteria and
displays the number on the message line.

Note that [Count Matching Records] was pressed instead of


[Execute Query]. Both keys can be used, one after the other, to count
and fetch records.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-34

A1.6.4.4 Using the WHERE clause with Multiple Conditions


For situations where you want to enter more sophisticated queries, you
can use the SQL language. Oracle Forms support most SELECT
clauses, with the exception of the GROUP BY and CONNECT BY
clauses.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-35

A1.7 Modifying Data in the


Database
This chapter explains how to use the application’s forms to modify data in the database.
This is a very important chapter to understand because you will be using Oracle Forms
frequently to add new records to the database or to modify existing records. The
following topics are covered in this chapter.

• Replacing, inserting and deleting characters


• Creating & deleting records

A1.7.1 Replacing, Inserting, and Deleting


Characters
Oracle Forms allows you to enter characters using one of two modes:

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].

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-36

A1.7.2 Inserting and Deleting a Record


Sometimes you want to retrieve records simply to view the information they contain; other
times, you want to change information.

A1.7.2.1 Inserting a record


One way to modify the contents of the database is to create a new
record.
In summary the steps are:
1. Use [Next Block] to move your cursor into the correct block
2. Press [Clear Block]
This clears data from the screen (but does not delete it from the
database) and makes room for you to enter the details of the
new record.
3. Use [Next Field] to tab around each of the fields of the record
entering data.
4. Press [Commit/Accept] to save the record to the database.

A1.7.2.2 Deleting a record


Another way to modify the contents of the database is to delete entire
records. For example, you may want do one of the following:
• Delete an item from an order
• Cancel an entire order
• Delete a client from the database

In summary, the steps are:


1. Use [Next Block] to position the cursor in the desired block
2. Press [Enter Query]
3. Type in the search criteria and press [Execute Query]
4. Use [Next Record] and [Previous Record] to make sure the
cursor is positioned on the record you wish to delete
5. Press [Delete Record] to delete the current record from the work
space.
6. Press [Commit/Accept] to have the record actually deleted from
the database
Oracle Forms will display the message
“Transaction completed – 1 records processed”

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-37

A1.8 Forms Processing


This chapter contains information about the way the application processes Forms data,
especially while transactions are being committed to the database. In this chapter you
will find descriptions of the following processes:

• Committing a transaction
• Rolling back a transaction
• Using automatic record locking

A1.8.1 Committing a transaction


When you use a form, the modifications you make to the database tables are not
recorded directly in the database; rather, they are record in the work space. To make
you modifications permanent, you must commit the contents of the work space to the
database by pressing [Commit/Accept]. After you have pressed this function key, data in
the work space is recorded in a table. Note that [Commit/Accept] affects your work in
every block of the current form, not just in the current block.

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.

A1.8.1.1 The Commit Dialogue


Many operations in Oracle Forms help you protect your modifications
before you can proceed. For example, if you have modified the current
block but have not committed the modifications, Oracle Forms displays
an alert when you press [Enter Query].

Press [Next Field] to reach the response you want and press [Select] to
choose it (or click on the appropriate button).

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-38

If you responded “Yes”, Oracle Forms commits the pending


modifications. If you responded “No”, Oracle Forms discards the
modifications for the current block. In either case, Oracle Forms then
proceeds with the operation you requested. If, however, you respond
“Cancel”, Oracle Forms returns you to where you were in the form
without committing any changes.

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]

A form can be designed to execute a commit at any time, and it


may perform the commit without notifying you.

A1.8.1.2 Validity Checking During a Commit


During a commit, a form can check the validity of data in numerous ways.
However, these validity checks are concerned only with relationships
among fields and records, not blocks.

Validity checks performed during a commit may include:


• Checks for uniqueness. These checks prevent any two rows of a
table from having the same value in a given field. For example, this
check prevents two records from having the same order number.
• Checks for consistency. For example, a consistency check might
ensure that the sum of the detail lines in an order matches the total
order value.

If an error is detected, Oracle Forms displays a message informing you


of the error. This message may be a standard Oracle Forms message, or
it may be a message created by the form’s designer. Next, Oracle Forms
moves the cursor to the record and field where the error was detected.

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-39

A1.8.2 Rolling Back a Transaction


To discard the contents of the work space, you can perform a Rollback by pressing [Clear
Form / Rollback]. Once you have committed a transaction to the database, [Clear Form /
Rollback] will not discard it.

Note that you can use [Clear Block] to clear the part of the work space that holds records
for the current block.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-40

A1.8.3 Using automatic record locking


Oracle Forms provides automatic record locking to prevent two or more users from
updating the same records at the same time. When you attempt to update a record,
Oracle Forms determines whether the record has been updated or deleted by another
user since you executed the query that retrieved the record. If the record has been
updated or deleted since you retrieved it, you will have to re-execute the query in order to
see and work with the revised record. If the record has not been changed, Oracle Forms
will lock the record so that other users cannot make modifications while you are updating
it.

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].

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-41

A1.9 Toolbars
This section describes the various toolbars used in this application

• The Default Menu Toolbar


• The Report Parameters Toolbar
• The Report Previewer Toolbar

A1.9.1 The Standard Forms Entry Toolbar


PRO*Resort uses mode-sensitive buttons to provide shortcuts to standard actions. The
mode changes automatically depending on the state of the form.

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

Here are details of each Toolbar button –

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-42

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.

In Enter Query mode, the following keys have these functions:


• [Enter Query] displays the query criteria last used.
• [Execute Query] performs the query. If records are retrieved, returns to normal
operation; however, if no record are found, remains in Enter Query mode.
• [Exit/Cancel] returns to normal operation without performing the query.
• [Count Matching Records] displays the number of rows that satisfy the current query
criteria. 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.

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.)

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-43

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.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-44

A1.10 Standard Function Keys


As well as having the Toolbar buttons available for frequently used functions,
PRO*Resort also provides a rich set of function key strokes for both screen navigation
and record manipulation.

Keystrokes shown below relate to client/server implementation. Keystrokes


are different for web browser clients – use Ctrl+K inside web browser client to view
keystroke options.

Function Keystroke Notes

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.

Choosing a block from the block menu causes the


cursor to move to that block.

If a form has many blocks, [Block Menu] will usually


move the cursor to a block more quickly than [Next
Block] or [Previous Block].

Cancel ESC Abort the current operation.

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 Block] does not remove records from the


database; it only removes records from the work
space.

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 Form] undoes all inserts, updates and deletes


posted to the database.

[Clear Form] does not delete records from the


database; it only removes records from the work
space.

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

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-45

Function Keystroke Notes

it in the paste buffer.

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.

In Enter Query mode, the current block does not


clear.

When used in Enter Query mode, [Count Matching


Records] counts the number of records matching the
specified search criteria.

Note: Pressing [Count Matching Records] after


[Execute Query] terminates the query, clears all the
records from the work space, and counts all of the
records in the table that can be retrieved by the block.

Cut Text Ctrl + x Removes an area of text after it has been selected
and stores it in the paste buffer.

Debug Mode Ctrl + ? Switch on debugging mode.

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.

Display Error Shift + F1 Display error information and / or advanced help


information, if available, for the field where the last
error occurred.

Down DownArrow Moves the cursor to the same field in the next record.

If the next record is a new record, [Down] moves the


cursor to the first field of the new record.

Down Ctrl + l Moves the cursor to the same field in the next record.

If the next record is a new record, [Down] moves the


cursor to the first field of the new 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.

Edit Ctrl + e Display a pop-up window in which the operator can


edit a field.

[Edit] is a toggle switch – pressing it twice dissolves


the window. Press [Exit/Cancel] to dissolve the
window without accepting its contents.

Enter Query F7 Clears the current block, allowing entry of query


criteria.

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-46

Function Keystroke Notes

In Enter Query mode, the following keys have these


functions:
• [Enter Query] displays the query criteria last
used.
• [Execute Query] performs the query. If records
are retrieved, returns to normal operation;
however, if no record are found, remains in Enter
Query mode.
• [Exit/Cancel] returns to normal operation without
performing the query.
• [Count Matching Records] displays the number of
rows that satisfy the current query criteria.

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.)

When used after [Enter Query], [Execute Query]


executes a query with the criteria specified.

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.

In editor, functions like [Undo] by undoing all changes


in that session. [Exit / Cancel] also dissolves the
editing window.

Exit Alt + F4 Exits the application.

Help F1 Displays a brief help message for the current field.


Pressing [Help] twice may display advanced help
information if available for that field.

Last Query F7 + F7 Re-submit the most recent query.

List Of Values F9 Activates a list of values, if there is one available for


this field. Following are the two types of lists of
values:

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.

Use the cursor keys or [Scroll Up] and [Scroll Down]


to navigate through the list. Press [Select] to choose
the selection and dissolve the list of values pop-up.
Press [Exit / Cancel] to leave the list without making a
selection.

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

Proteus Corporation opmanA1/v5.0/Nov 2006


PRO*Resort v5 Operators Manual Using Oracle Forms A1-47

Function Keystroke Notes

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 Menu Ctrl + Enter

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.

Show Keys Ctrl + F1 Displays the function key assignments currently in


effect.

Up UpArrow Moves the cursor to the same field in the previous


record.

Proteus Corporation opmanA1/v5.0/Nov 2006

You might also like