3.8.2 Defining the List of Values
When you create a list-driven page item, you define its list of valid choices either locally on the page item itself or by referencing a shared component List of Values by name.
If it's the first time you need a particular list of choices, then defining it locally is most immediate. Later, if you need to reuse a list you defined somewhere else, you can easily convert the locally-defined list to a shared List of Values component. Then you can reference it in multiple page items going forward.
In both cases, for each valid choice you provide a Display
Value and a Return Value. The display value is what
the user sees in the user interface. The return value gets assigned to the page item
when the user makes a selection. For a list-driven page item configured for single
selection, its value is the return value of the user's choice. For a multi-selection
page item, the value is a delimiter-separated string containing the return values
corresponding to the user's choices. The default delimiter is the colon
(:), but you can configure it to be a different character when
needed.
For example, for a page item showing a list of departments, the list of choices might be defined as follows:
| Display Value | Return Value |
|---|---|
| ACCOUNTING | 10 |
| RESEARCH | 20 |
| SALES | 30 |
| OPERATIONS | 40 |
After a user chooses SALES from a single-selection page item P5_SELECTED_DEPARTMENT, its value would be 30. For a multi-selection page item P5_SELECTED_DEPARTMENTS, after the user chooses ACCOUNTING and RESEARCH its value would be 10:20.
- Defining a Local List of Values
To define the available choices for a list-driven page item, you can specify a set of static values or provide a SQL query. - Additional Shared LOV Features
If you anticipate reusing a list of values multiple times, define a shared List of Values (LOV). This named component supports additional features and data sources when compared with a locally-defined one. - Converting Local LOVs to Shared
You can use the Locally Defined tab of the shared List of Values component page to quickly convert any locally-defined LOV to a named, shared one.
Parent topic: Cascading, List-Driven Items