10.6 Creating Lists of Values at the Application Level

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.

Creating a LOV as a shared component has several advantages:

  • It can be added to any page within an application.

  • All LOV definitions are stored in one location, making them easy to locate and update.

Topics:

10.6.1 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. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

    The Application home page appears.

  3. Click the Shared Components icon.

  4. Under User Interface, select Lists of Values.

    The Lists of Values page appears.

  5. To create a LOV, click Create.

  6. Follow the on-screen instructions.

    New named LOVs are added to the List of Values repository. Note to add the LOV to a page you must edit the appropriate item or column and select the named LOV.

10.6.1.1 About the List of Values Page

Once you create an LOV, it appears on the List of Values page.

Description of lov_page.gif follows
Description of the illustration lov_page.gif

A navigation bar appears at the top of the page and contains the following controls:

  • Select columns to search icon - Resembles a magnifying glass. Click this icon to narrow your search to only specific columns. To search all columns, select All Columns.

  • Text area - Enter case insensitive search criteria (wildcard characters are implied) and then click Go.

  • Go button - Executes a search or applies a filter.

  • View Icons - Displays each LOV as a large icon. To edit a group, click the appropriate icon.

  • View Report - Displays each LOV as a line in a report. To edit a group, click the name.

  • Actions menu - Displays the Actions menu. Use this menu to customize an interactive report. See "About the Actions Menu".

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

10.6.3 Editing an Existing LOV

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

To edit an LOV:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Lists of Values.

  5. Select an LOV.

    The Edit page appears.

  6. To learn more about a specific item on a page, click the item label.

    When help is available, the cursor changes to an arrow and question mark when you pass the cursor over an item. See "About Field-Level Help".

  7. Click Apply Changes.

10.6.3.1 About Navigation Alternatives

The Edit List of Values page is divided into the following sections: Name, Subscription, and Source.

You can access these sections by scrolling down the page, or by clicking a navigation button at the top of the page. When you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

10.6.3.2 Bulk Edit of Static LOVs

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. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Lists of Values.

    By default, LOVs display as icons.

  5. Click the Grid Edit tab.

  6. Edit the display text and click Apply Changes.

10.6.4 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

10.6.5 Accessing LOV Reports

Application Builder includes many reports designed to help you better manage LOVs.

To access LOV reports:

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

  2. Select an application.

  3. When Application Builder appears, click Shared Components.

  4. Under User Interface, select Lists of Values.

  5. Select one of the following tabs at the top of the page:

    • Edit Null Text

    • Locally Defined

    • Grid Edit

    • Conditional Entries

    • Subscription

    • Utilization

    • History

  6. Follow the on-screen instructions.

10.6.5.1 Edit Null Text

Click Edit Null Text to edit null text for all LOVs in your application.

10.6.5.2 Locally Defined

Click Locally Defined to view 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.

10.6.5.3 Grid Edit

Click Grid Edit to edit the display values of all static LOVs.

10.6.5.4 Conditional Entries

Click Conditional Entries to view LOVs that display conditionally.

10.6.5.5 Subscription

Click Subscription to display the List of Values Subscription page. This page displays all subscribed LOVs in your application.

10.6.5.6 Utilization

Click Utilization to view a report of where LOVs are used in your application.

10.6.5.7 History

Click History to display the List of Values History page. This page displays a history of recently changed LOVs by date.