Database Reference
In-Depth Information
business rules of the application without introducing undue work for them. In this exer-
cise, you take the requirement for
P2_CREATED_BY
to be entered in uppercase and
use SQL and PL/SQL to create a dynamic action that alters the user's input to upper-
case, no matter what they enter. Here are the steps:
1.
Edit
Page 2
of the application.
2.
Right-click the
P2_CREATED_BY
item, and choose
Create Dynamic
Action
from the context menu.
3.
Enter
Change Case to Upper
for
Name
, and click
Next
.
4.
Set
Event
to
Lose Focus
, set
Condition
to
is not null
, and click
Next
.
5.
Set
Action
to
Set Value
, and make sure
Fire On Page Load
is deselected.
6.
In the
Settings
region, select
PL/SQL Expression
for
Set Type
.
7.
Enter
UPPER(:P2_created_by)
for
PL/SQL Expression
and
P2_CREATED_BY
in
Page Items to Submit
, and click
Next
. See
Figure
Figure 16-14.
Using a PL/SQL expression as the body of a dynamic action