|
|
Oracle Application Express
(APEX):
Passing
values between screens
Oracle Tips by Burleson Consulting |
It's easy to understand the contents of a
APEX URL. The APEX documentation shows an example of
passing values between screens:
Passing a single item in APEX
It clears existing information and sets the
item's value (typically a primary key).
f?p=6000:6003:&SESSION.::NO:6003:MY_ITEM:1234
Specifically this example:
-
Runs page 6003 of application 6000 and
use the current session ID
-
Indicates to not show debug information
(NO)
-
Clears all values maintained by the
current session's cache for items on page 6003
-
Sets the session state of an item called
MY_ITEM to the value 1234
Passing multiple screen
values in APEX
This example is similar to the previous one
except it passes values to multiple items.
f?p=6000:6004:&SESSION.::NO:6003:MY_ITEM1,MY_ITEM2,MY_ITEM3:1234,,5678
Specifically this example:
-
Runs page 6004 of application 6000 and
use the current session ID
-
Clears the current session's cache for
items on page 6003
-
Indicates debug information should be
hidden (NO)
-
Sets the value of MY_ITEM1 to 1234, sets
the value of MY_ITEM2 to null (indicated by the commas used as
placeholder), and set the value of MY_ITEM3 to 5678
The Oracle APEX Users guide shows how
APEX passes literal
literal values, a potential security threat unless you implement
proper APEX
security policies.
Our example of passing variables between
screens
Now let's try this with other examples of
passing screen values in APEX. In our example we pass a flight_key value to a new screen numbered 666:
f?p=&APP_ID.:666:&SESSION.:6600:&DEBUG.::FLIGHT_KEY,flight_nbr:#FLIGHT_KEY#
We can also specify the values in the APEX
link atribute screen, in this case we pass two values, flight_sched
and flight_nbr to the destination screen, page 66:
Displaying values on the destination APEX
screen
To verify that the values have been passed we
go to the destination screen and create a display item to confirm
that the values have been properly passed from the sending APEX
screen:
APEX book and code samples:
APEX developer support:
|
For APEX development support just call to gat an
Oracle Certified professional for all APEX development
projects. |
|