Home > APEX_ITEM > POPUP_FROM_QUERY ...
This function generates an HTML popup select list from a query. Like other available functions in the APEX_ITEM
package, the POPUP_FROM_QUERY
function is designed to generate forms with F01
to F50
form array elements.
Syntax
APEX_ITEM.POPUP_FROM_QUERY( p_idx IN NUMBER, p_value IN VARCHAR2 DEFAULT, p_lov_query IN VARCHAR2, p_width IN VARCHAR2 DEFAULT, p_max_length IN VARCHAR2 DEFAULT, p_form_index IN VARCHAR2 DEFAULT, p_escape_html IN VARCHAR2 DEFAULT, p_max_elements IN VARCHAR2 DEFAULT, p_attributes IN VARCHAR2 DEFAULT, p_ok_to_query IN VARCHAR2 DEFAULT, p_item_id IN VARCHAR2 DEFAULT NULL, p_item_label IN VARCHAR2 DEFAULT NULL) RETURN VARCHAR2;
Parameters
Table: POPUP_FROM_QUERY Parameters describes the parameters in the POPUP_FROM_QUERY
function.
POPUP_FROM_QUERY Parameters
Parameter | Description |
---|---|
|
Form element name. For example, |
|
Form element current value. This value should be one of the values in the |
|
SQL query that is expected to select two columns (a display column and a return column). For example: SELECT dname, deptno FROM dept |
|
Width of the text box. |
|
Maximum number of characters that can be entered in the text box. |
|
HTML form on the page in which an item is contained. Defaults to 0 and rarely used. Only use this parameter when it is necessary to embed a custom form in your page template (such as a search field that posts to a different Web site). If this form comes before the |
|
Replacements for special characters that require an escaped equivalent.
Range of values is |
|
Limit on the number of rows that can be returned by your query. Limits the performance impact of user searches. By entering a value in this parameter, you force the user to search for a narrower set of results. |
|
Additional HTML attributes to use for the form item. |
|
Range of values is |
|
ID attribute of the form element. |
|
Invisible label created for the item. |
Example
The following example demonstrates a sample query the generates a popup select list from the emp
table.
SELECT APEX_ITEM.POPUP_FROM_QUERY (1,deptno,'SELECT dname, deptno FROM dept') dt FROM emp