Databases Reference
In-Depth Information
Page-Level Validation
Page-level validations apply to one or more items simultaneously and often can be an entire PL/SQL block of code
that must evaluate to
TRUE
in order for the validation to be successful. The requirement for the Help Desk application
is to compare the Created On date with the Closed On Date to ensure that they occur in chronological order. A ticket
that is closed before it's created doesn't make any sense. This is a good example of using a validation to ensure data
quality. Here's how to create the validation you need:
1.
Edit
Page 210
of the application.
2.
Using the
Create
button, select
Page control on this page
.
3.
Select
Validation
, and click
Next
.
4.
Select
Page
for
Validation Level
, and click
Next
.
Enter
Closed Date must be After Creation Date
for
Validation Name
, and set
Error
Display Location
to
Inline in Notification
, as shown in Figure
8-12
. Click
Next
.
5.
Figure 8-12.
Validation name and display location
6.
Choose
PL/SQL
for
Select a validation type
, as shown in Figure
8-13
, and click
Next
.
Figure 8-13.
Choosing to create a validation involving PL/SQL code