Oracle Application Express: Developing Database Web Applications
Oracle Application Express: Developing Database Web Applications
Hands-On-Labs Guide
HOL 10-1 Implementing Validations on the Maintain Project Page: In this lab, you create and
use validations on the Maintain Project page.
HOL 10-2 Creating and Using a Computation: In this lab, you create a computation that
changes the value of a field entered using the form to uppercase after the page is submitted
HOL 10-3 Creating and Using a Process: This lab covers creating an After Submit process on
the Project Budget form page
HOL 10-4 Creating and Using Validations: In this hands-on lab, you create a not null validation
and a validation to ensure that the item is numeric.
2
Oracle Application Express: Developing Database Web Applications
In this lab, you add validations to the Maintain Projects page so that when a user changes the status
to Completed, they add the Completed Date and that it is not forward-dated.
a) In the navigation menu, click DEMO_PROJECTS. In the Developer Toolbar, click Edit
Page 4.
3
Oracle Application Express: Developing Database Web Applications
4
Oracle Application Express: Developing Database Web Applications
Note: The #LABEL# text within the Error Message will be substituted with the Label of
the associated item. In this manner, if the item label is updated the error message will also
reflect the updated value. This improves consistency and prevents messages having an out of
date label reference.
5
Oracle Application Express: Developing Database Web Applications
6
Oracle Application Express: Developing Database Web Applications
Click Save.
6. Now that you created the two validations, you want to verify if they work as expected. Navigate
to the Demo Projects application runtime environment.
In the navigation menu, click DEMO_PROJECTS. Then, select a project name.
7
Oracle Application Express: Developing Database Web Applications
a) Save a record with a Status of COMPLETED and no Completion Date - An error message
should be displayed.
8
Oracle Application Express: Developing Database Web Applications
b) Save a record with a Completion Date in the future - An error message should be displayed.
9
Oracle Application Express: Developing Database Web Applications
In this lab, you create a computation that changes the Assigned To value entered using the form to
uppercase after the page is submitted.
2. In the navigation menu, click Project Budget Report. This is the interactive report that has
been created when you created the application using a spreadsheet in HOL 3-2.
a) In the PROJECT_BUDGET interactive report, click the Edit icon (pencil) for any record.
Then, in the Developer Toolbar, click Edit Page 5.
10
Oracle Application Express: Developing Database Web Applications
11
Oracle Application Express: Developing Database Web Applications
Click Save.
d) This is a dialog page and so you cannot run this directly. You need to first run interactive
report page.
Navigate to application runtime environment and click Project Budget Report in the
navigation menu and then click the edit icon for a record.
f) In the report, notice that the value for Assigned To is stored in uppercase.
12
Oracle Application Express: Developing Database Web Applications
13
Oracle Application Express: Developing Database Web Applications
In this lab, you create a process to insert a record into a table called AUDIT_DETAILS every time a
project is added.
1. You want to create an After Submit process on the Budget form page. Whenever a user adds a
new project by using this form, the user details are stored in the AUDIT_DETAILS table.
Perform the following steps:
b) Copy the following SQL and paste it in the SQL Commands area and click Run.
14
Oracle Application Express: Developing Database Web Applications
c) The table is created. Now, navigate to the window or tab of the Budget App application runtime
environment.
In the navigation menu, click Project Budget Report.
Click the Edit icon for a record and then in the Developer Toolbar, click Edit Page 5.
15
Oracle Application Express: Developing Database Web Applications
Click Save.
Note: The sequence of this process should be the one immediately after the Process Row of
Process form Project Budget process.
16
Oracle Application Express: Developing Database Web Applications
17
Oracle Application Express: Developing Database Web Applications
5. Now, you want to verify if the processes are working. In the page designer toolbar, click the
Navigate to Previous Page arrow.
18
Oracle Application Express: Developing Database Web Applications
6. Click Save and Run Page, then click the Create button.
7. In the Budget dialog, enter values for each of the fields and click Create.
• Project: New Packaged App
• Task Name: Prepare requirements doc
• Start Date: 11/1/2019
• End Date: 11/25/2019
• Status: Open
• Assigned To: Pam King
• Cost: 500
• Budget: 800
19
Oracle Application Express: Developing Database Web Applications
20
Oracle Application Express: Developing Database Web Applications
In this lab, you create two validations on the Project Budget form page. The first validation you
create ensures that the project field is not null. The second one ensures that the value entered for
cost is only numeric.
1. Navigate to the window or tab of the Budget App application runtime environment.
In the navigation menu, click Project Budget Report.
Click the Edit icon for a record and then in the Developer Toolbar, click Edit Page 5.
2. You want to create two validations. The first validation is to ensure that the Project field is not
null.
In the page designer, click the Processing tab.
Right-click Validating and select Create Validation.
21
Oracle Application Express: Developing Database Web Applications
4. You need to create another validation to ensure that the value entered for Cost should be only
numeric.
Under Processing, right-click Validating and select Create Validation.
22
Oracle Application Express: Developing Database Web Applications
Click Save.
23
Oracle Application Express: Developing Database Web Applications
6. Now, you can test to verify if the validations work. Navigate to the application run time
environment.
In the navigation menu, click Project Budget Report.
Then, click Create.
7. In the Project Budget dialog, enter the following and then click the Create button.
• Task Name: Prepare requirements doc
• Start Date: 11/2/2019
• End Date: 11/25/2019
• Status: Open
• Assigned To: Pam King
• Cost: abcd12
• Budget: 3000
24
Oracle Application Express: Developing Database Web Applications
25
Oracle Application Express: Developing Database Web Applications
26
Oracle Application Express: Developing Database Web Applications
27