Database Reference
In-Depth Information
Figure 8-19.
An error message using substitution variables
10.
Set
Condition Type
to
PL/SQL Function Body Returning a Boolean
,
and type the following code into
Expression 1
:
IF :STATUS_ID = get_status('CLOSED') THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
11. Make sure
Execute Condition
is set to
For Each Row
, and click
Create
Validation
.
When you run the Manage Multiple Tickets page, you can test the new validation
either by adding a new ticket with a status of CLOSED and no Closed On date set, or
by removing the Closed On date of an existing closed ticket and attempting to save the
changes. In
Figure 8-20
, each row that doesn't meet the validation requirement is high-
lighted and appears in a list of errors at the top of the page. In this example, the row
that didn't have a Closed On date failed the validation and is flagged as needing atten-
tion.