apex_add_lov
Create a List of Values (LOV) for Oracle APEX select items, using either static display/return pairs or a SQL query to supply dropdown options.
Instructions
Create a List of Values (LOV) — static or SQL-based — for select items.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lov_name | Yes | Unique name for this LOV (e.g., "DEPARTMENTS", "STATUS_LIST"). Referenced by name in apex_add_item(lov_name=...). | |
| lov_type | No | Type of LOV: - "sql": Dynamic LOV from SQL query (default) - "static": Static list of display/return value pairs | sql |
| sql_query | No | SQL query for type="sql". Must return 2 columns: display value, return value. Example: "SELECT department_name d, department_id r FROM departments ORDER BY 1" The column aliases 'd' and 'r' are conventional but any names work. | |
| return_column | No | Explicit return column name (auto-detected from SQL if omitted). | |
| static_values | No | List of dicts for type="static". Each dict: {"display": "...", "return": "..."} Example: [{"display": "Active", "return": "Y"}, {"display": "Inactive", "return": "N"}] | |
| display_column | No | Explicit display column name (auto-detected from SQL if omitted). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |