APEX gives you a lot of power and flexibility with its built in wizards. They are very good at
creating the base needs of a general application. This is true with forms. However, the wizards
create everything in the same way, which may or may not be what you want the end form to look
like. In this tutorial we will look at how to alter and better control the form’s appearance and
layout, as well as how to optimize our form somewhat. This tutorial installs it’s own sample data,
so the OEHR sample data is not required, but we reccomend you have it installed if you don’t
already. Our article on APEX Tutorial Preparation and OEHR Sample Data Install covers it’s
installation and creation of a user account for development purposes.
Part 3 – Creating Hints, Altering Item types, Label Templates and Buttons
High Level Steps
1) Create a Hint Region. (0:30)
2) Changing Item Types (1:42)
3) Label Templates (5:29)
4) Buttons and Bold (6:10)
Times in parenthesis are the approximate start times for those steps
Notes and Resources.
As mentioned in the tutorials first part, the wizards create evrything in a form the same way.
By altering the item type we can make the form more compact, as well as easier to use for the
end user. We have a variety of options availible to us, from radio groups, to check boxes, to
select lists, as well as others. An empty field is not always the best way to get information.
We discuss the Label Templates, but make no changes in this tutorial. Any label can be altered
by it’s template setting, as well as other options. One thing of some confusion is the
difference between the templates ‘optional label with help’ and ‘required label with help’. The
main difference is that the Required Label option puts a small yellow asterik next to the label.
The number and type of label templates availible vary based on which theme you selceted for the
We also discuss but make no changes to the buttons in this application. Like all items in the
application, you can alter the appearance, position, label, and functionality of the buttons. We
have allowed the APEX system to place the buttons in this application, but we are free to move
them about if we wanted to.
Running for Update
This application is primarilly designed to input new employees. However, if you wanted to see
how some fo the conditional settings work, you need it in update form. If you wanted to fo this,
you woudl take the URL of the page (while it’s running, not in the developers edit screen) and
to the end of it add ‘P2_EMP_ID:1′, This will force a value (1) to be assigned to the named item
(P2_EMP_ID) and you will be able to see the data associated with that record. For example, if my
URL was ‘apex.oracle.com/pls/otn/f?p=9659:2:1284393467360777225::::’ I could update a record by
editing it to be apex.oracle.com/pls/otn/f?p=9659:2:1284393467360777225::::P2_EMP_ID:1 which
would allow me to view and update the record for employee 1
Code and Entered Text
Below is the text for the Hint Region
Use this page to enter and maintain employee information.
This is the LOV for P2_EMP_PART_OR_FULL_TIME
This is the LOV and Null Display Value for P2_EMP_DEPT
- No Assignment -
This is the LOV for P2_EMP_TELECOMMUTE.