35.14 SELECT_LIST_FROM_LOV Function
This function dynamically generates select lists from a shared list of values (LOV). Similar to other functions available in the APEX_ITEM
package, these select list functions are designed to generate forms with F01
to F50
form array elements.
This function is the same as SELECT_LIST_FROM_LOV_XL
, but its return value is VARCHAR2
. Returned values are limited to 32k.
Syntax
APEX_ITEM.SELECT_LIST_FROM_LOV (
p_idx IN NUMBER,
p_value IN VARCHAR2 DEFAULT NULL,
p_lov IN VARCHAR2,
p_attributes IN VARCHAR2 DEFAULT NULL,
p_show_null IN VARCHAR2 DEFAULT 'YES',
p_null_value IN VARCHAR2 DEFAULT '%NULL%',
p_null_text IN VARCHAR2 DEFAULT '%',
p_item_id IN VARCHAR2 DEFAULT NULL,
p_item_label IN VARCHAR2 DEFAULT NULL,
p_show_extra IN VARCHAR2 DEFAULT 'YES' )
RETURN VARCHAR2;
Parameters
Parameter | Description |
---|---|
p_idx |
Form element name. For example, 1 equals F01 and 2 equals F02 . Typically, the p_idx parameter is constant for a given column.
|
p_value |
Current value. This value should be a value in the p_lov parameter.
|
p_lov |
Text name of an application list of values. This list of values must be defined in your application. This parameter is used only by the select_list_from_lov function.
|
p_attributes |
Extra HTML parameters you want to add. |
p_show_null |
Extra select option to enable the NULL selection. Range of values is YES and NO .
|
p_null_value |
Value to be returned when a user selects the NULL option. Only relevant when p_show_null equals YES .
|
p_null_text |
Value to be displayed when a user selects the NULL option. Only relevant when p_show_null equals YES .
|
p_item_id |
HTML attribute ID for the <select> tag.
|
p_item_label |
Invisible label created for the item. |
p_show_extra |
Shows the current value even if the value of p_value is not located in the select list.
|
Example
The following example demonstrates a select list based on an LOV defined in the application.
SELECT APEX_ITEM.SELECT_LIST_FROM_LOV(2,job,'JOB_FLOW_LOV')job
FROM emp
Parent topic: APEX_ITEM (Legacy)