Database Reference
In-Depth Information
IF :P210_STATUS_ID = get_status('CLOSED') THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
12. Click the Create Validation button to complete the wizard.
Once the validation has been created, it appears in the Page Rendering and Page
Processing sections on the APEX Page Definition screen, as shown in Figure 8-11 .
Both references point to the same implementation and are shown for easy navigation.
Figure 8-11. Validations created appear in two places on the Application Builder page
This validation now requires that a value be entered for the Closed On item when
the ticket status is set to CLOSED. The condition applied to the validation is evaluated
every time the page is submitted.
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 .
 
 
Search WWH ::




Custom Search