27.9 GET_URL Function
This function returns an Oracle Application Express f?p= URL. It is sometimes clearer to read a function call than a concatenated URL. See the example below for a comparison.
Syntax
FUNCTION GET_URL (
p_application IN VARCHAR2 DEFAULT NULL,
p_page IN VARCHAR2 DEFAULT NULL,
p_session IN NUMBER DEFAULT APEX.G_INSTANCE,
p_request IN VARCHAR2 DEFAULT NULL,
p_debug IN VARCHAR2 DEFAULT NULL,
p_clear_cache IN VARCHAR2 DEFAULT NULL,
p_items IN VARCHAR2 DEFAULT NULL,
p_values IN VARCHAR2 DEFAULT NULL,
p_printer_friendly IN VARCHAR2 DEFAULT NULL,
p_trace IN VARCHAR2 DEFAULT NULL )
RETURN VARCHAR2;Parameters
Table 27-3 GET_URL Parameters
| Parameter | Description |
|---|---|
|
|
The application ID or alias. Defaults to the current application. |
|
|
Page ID or alias. Defaults to the current page. |
|
|
Session ID. Defaults to the current session ID. |
|
|
URL request parameter. |
|
|
URL debug parameter. Defaults to the current debug mode. |
|
|
URL clear cache parameter. |
|
|
Comma-delimited list of item names to set session state. |
|
|
Comma-delimited list of item values to set session state. |
|
|
URL printer friendly parameter. Defaults to the current request's printer friendly mode. |
|
|
SQL trace parameter. |
Example
This query uses APEX_PAGE.GET_URL and its alternative APEX_UTIL.PREPARE_URL to produce two identical URLs.
SELECT APEX_PAGE.GET_URL (
p_page => 1,
p_items => 'P1_X,P1_Y',
p_values => 'somevalue,othervalue' ) f_url_1,
APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:1:&APP_SESSION.::::P1_X,P1_Y:somevalue,othervalue')
FROM DUALParent topic: APEX_PAGE