Databases Reference
In-Depth Information
At this point, the process has been created. Currently you don't show the Last Updated date in the summary
report. In order to see the value on the report, you need to add the LAST_UPDATED column to the query from which the
report draws data. That report resides on page 200 of your application:
1.
Edit Page 200 .
2.
Edit the Tickets region by double-clicking the region's name in the tree.
3.
Add the LAST_UPDATED date to the Region Source of the report, as in the following SQL.
Click Apply Changes when you're finished:
SELECT
"TICKETS"."TICKET_ID" "TICKET_ID",
"TICKETS"."SUBJECT" "SUBJECT",
"TICKETS"."DESCR" "DESCR",
"TICKETS"."ASSIGNED_TO" "ASSIGNED_TO",
"TICKETS"."CREATED_ON" "CREATED_ON",
"TICKETS"."CLOSED_ON" "CLOSED_ON",
"TICKETS"."CREATED_BY" "CREATED_BY",
"STATUS_LOOKUP"."STATUS" "STATUS",
"TICKETS"."LAST_UPDATED" "LAST_UPDATED"
FROM
"STATUS_LOOKUP",
"TICKETS"
WHERE "STATUS_LOOKUP"."STATUS_ID" = "TICKETS"."STATUS_ID"
and upper(subject) like
'%' || upper(:P200_SEARCH) || '%'
and tickets.status_id like :P200_STATUS_ID
To test and review the change, run the application and navigate to the Tickets report. Edit any ticket, and click the
Apply Changes button. You should now see a value for Last Updated indicating the current day.
This is a quick example of how you can use a process to apply form-based logic. When the form is used to make
changes, a brief piece of PL/SQL makes a record change automatically. Packages, procedures, and APIs all can be
reached using processes similar to this one.
PL/SQL Regions
The PL/SQL region type is effectively an open container for PL/SQL with the additional option to generate output.
You can use Oracle Web Application (OWA) Toolkit procedures such as htp.p to generate the output. References
to APEX items can be made using bind variable syntax (for example, :P1_ITEM_NAME ), the v function (for example,
v('P1_ITEM_NAME') ), or the substitution string syntax (for example, &P1_ITEM_NAME. ) to support the logic contained
in the region.
PL/SQL regions differ from process regions in that PL/SQL regions are executed only during page rendering
whereas processes can run on both page processing and page rendering. PL/SQL regions have the advantage of being
able to generate content directly on the page. A use case for this type of output is the need for a complex report format
that is beyond the ability of a standard report template. In that case, a PL/SQL package that generates the needed
HTML output can be written and called by a PL/SQL region.
 
Search WWH ::




Custom Search