This section describes how to create lists of values.
A list of values (LOV) is a static or dynamic set of values used to display a specific type of page item, such as popup lists of values, a select list, a check box, a radio group, or multiple select lists. By creating a list of values at the application-level, you are creating shared component. Creating a LOV as a shared component has several advantages:
You can add it to any page within an application.
All LOV definitions are stored in one location, making them easy to locate and update.
You define named (or shared) LOVs at the application level by running the Create LOV Wizard and adding them to the List of Values repository. All LOVs can be defined as static or dynamic. Static lists are based on predefined pairs of display values and return values. Dynamic lists are based on a SQL query you write that selects values from a table.
To create a named LOV:
Navigate to the Shared Components page:
On the Workspace home page, click Application Builder.
Select an application.
On the Application home page, click Shared Components.
The Shared Components page appears.
Under Other Components, select List of Values.
The Lists of Values page appears.
To create a LOV, click Create.
Follow the on-screen instructions.
New named LOVs are added to the List of Values repository. To add the LOV to a page, you must edit the appropriate item or column and select the named LOV.
Static LOVs are based on a static list of display values and return values you specify when you run the Create LOV Wizard. To create a static LOV, run the Create LOV Wizard and select the LOV type Static. Oracle Application Express stores the display values, return values, and sort sequence you specify in the List of Values repository. Once you add a static LOV to the repository, you can create an item and display it as a check box, radio group, select list, or popup list based on this definition.
To edit an existing LOV, select the LOV on the Lists of Values page.
To edit a LOV:
Navigate to the Shared Components page:
On the Workspace home page, click Application Builder.
Select an application.
On the Application home page, click Shared Components.
The Shared Components page appears.
Under Other Components, select List of Values.
The Lists of Values page appears.
Select an LOV.
The Edit page appears.
Edit the attributes.
To learn more about an attribute, see field-level Help. See "Viewing Field-Level Help."
Click Apply Changes.
You can edit the display values of all static LOVs by clicking the Grid Edit button on the Edit List of Values page.
To perform a bulk edit of static LOVs:
Navigate to the Shared Components page:
On the Workspace home page, click Application Builder.
Select an application.
On the Application home page, click Shared Components.
The Shared Components page appears.
Under Other Components, select List of Values.
By default, LOVs display as icons.
Click the Grid Edit tab.
Edit the display text and click Apply Changes.
You can reference session state by using bind variables. Keep in mind that referencing session state makes an LOV a bit less reusable, but is still a recommended development practice. In the following example, this LOV only works if the item called my_deptno
contains a valid department number.
SELECT ename, empno FROM emp WHERE deptno = :P1_DEPTNO
To access LOV reports:
Navigate to the Shared Components page:
On the Workspace home page, click Application Builder.
Select an application.
On the Application home page, click Shared Components.
The Shared Components page appears.
Under Other Components, select List of Values.
By default, LOVs display as icons.
Select one of the following tabs at the top of the page:
Edit Null Text - Edit null text for all LOVs in your application.
Locally Defined - Displays all LOVs that are defined locally with the definition of an item. LOVs that are usable by multiple pages can be converted into shared lists of values. Converting locally defined lists of values into a shared list of values promotes reuse.
Grid Edit - Enables you to edit the display values of all static LOVs.
Conditional Entries - Displays all LOVs that display conditionally.
Subscription - Displays all subscribed LOVs in your application.
Utilization - Displays where LOVs are used in your application
History - Displays a history of recently changed LOVs by date
Follow the on-screen instructions.