Database Reference
In-Depth Information
'%' || 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 pro-
cesses similar to this one.
PL/SQL Regions
The PL/SQL region type is effectively an open container for PL/SQL with the addition-
al option to generate output. You can use Oracle Web Application (OWA) Toolkit pro-
cedures 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 ex-
ample, 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.
In the Help Desk application, you want to make the home page a bit more useful by
adding a quick summary of the number of tickets an individual has open. This is ap-
plicable only if someone is logged in. So if they aren't logged in, a simple greeting
message will suffice. You can accomplish the task of adding the summary by adding a
PL/SQL region with some logic to output the appropriate message:
1.
Edit Page 1 .
2.
Edit the APEX Issue Tracker region by double-clicking its name in the
tree.
Search WWH ::




Custom Search