18.6 Creating Lists of Values at the Application Level

This section describes how to create lists of values.

18.6.1 What is a List 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.

18.6.2 Creating a Named LOV at the Application Level

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:

  1. Navigate to the Shared Components page:

    1. On the Workspace home page, click Application Builder.

    2. Select an application.

    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Other Components, select List of Values.

    The Lists of Values page appears.

  3. To create a LOV, click Create.

  4. 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.

18.6.3 About Static LOVs

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.

18.6.4 Editing an Existing LOV

To edit an existing LOV, select the LOV on the Lists of Values page.

18.6.4.1 Editing a LOV

To edit a LOV:

  1. Navigate to the Shared Components page:

    1. On the Workspace home page, click Application Builder.

    2. Select an application.

    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Other Components, select List of Values.

    The Lists of Values page appears.

  3. Select an LOV.

    The Edit page appears.

  4. Edit the attributes.

    To learn more about an attribute, see field-level Help. See "Viewing Field-Level Help."

  5. Click Apply Changes.

18.6.4.2 Editing LOVs in Bulk

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:

  1. Navigate to the Shared Components page:

    1. On the Workspace home page, click Application Builder.

    2. Select an application.

    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Other Components, select List of Values.

    By default, LOVs display as icons.

  3. Click the Grid Edit tab.

  4. Edit the display text and click Apply Changes.

18.6.5 About Referencing Session State Within an LOV

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

18.6.6 Accessing LOV Reports

To access LOV reports:

  1. Navigate to the Shared Components page:

    1. On the Workspace home page, click Application Builder.

    2. Select an application.

    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Other Components, select List of Values.

    By default, LOVs display as icons.

  3. 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

  4. Follow the on-screen instructions.