Database Reference
In-Depth Information
Here you use the PL/SQL UPPER expression to take the user's input and convert it
to uppercase. You reference the value the user entered by using the bind variable
:P2_CREATED_BY . However, because the value the user entered into the web
browser has not been submitted to APEX, that value isn't currently in session state.
That's why you need to include it in the list of page items to submit.
If you needed to reference several values of user input, you must enter them all as a
comma-separated list.
8. Because there will be no False action, accept the defaults on this
page, and click Next .
9. Set Selection Type to Triggering Element , and click Create Dy-
namic Action .
Now, when page 2 is run, any text entered in the Created By field is made uppercase
when the user exits the field.
Note Dynamic actions that use SQL or PL/SQL for their conditions or body actu-
ally make a call back to the database server to run the code in question. Depending on
the weight and complexity of the code, this could potentially introduce performance is-
sues. Save the use of SQL and PL/SQL for actions that require interaction with the data-
base to retrieve data that isn't available from directly within the page.
Dynamic Actions Using JavaScript
In addition to PL/SQL, you can use JavaScript in dynamic actions. In this exercise, you
use JavaScript to determine the onscreen status of a ticket that you're editing on page
210. If the user has set the status to CLOSED, the dynamic action will automatically
set the Closed On date to today's date:
1.
Edit Page 210 of the application.
2.
Create a new dynamic action by right-clicking the Dynamic Actions node
in the Page Rendering tree and selecting Create from the context menu.
3.
Enter AutoFill Closed_On Date for Name , and click Next .
4.
Make sure Event is set to Change , set Selection Type to Item(s) , and enter
P210_STATUS_ID for Item(s).
Search WWH ::




Custom Search