Use a Local Data Source for a List of Values

You can configure a list of values that uses a "local data source" for its values. A local data source is a set of name-value pairs stored in the integrated workbook.

These local data sources can be created by Oracle Visual Builder Add-in for Excel to store enums, if the service includes these. You can also create your own local data sources if required.

Create a Local Data Source for a List of Values

You can create a local data source that provides the values for the list of values (LOV). This data source stores these values in your integrated workbook as a set of name-value pairs.

Local data sources have a couple of key benefits. They convert field codes to user-friendly display values automatically to improve the user experience. They also provide the business user with a drop-down list that restricts the choices to a fixed set of appropriate values.

Let's consider an example. You may have a business object, Computer, with a Boolean field, personal, that captures whether the device is a business or personal one. In this case, the field expects only "True" and "False" values.

You may want to create an LOV on the personal field that displays "Yes" and "No" values in the list. To do this, create a new local data source in the catalog that includes these values, then configure an LOV for the personal field that uses this data source.

To create a local data source for a list of values:

  1. From the Oracle Visual Builder tab, click Manage Catalogs.
  2. In the Manage Business Object Catalogs window, select the catalog where you want to define the data source and click the Edit Business Object Catalog icon.
  3. From the Business Object Catalog Editor, click Local Data Sources.
  4. From the Local Data Sources tab, create a new data source:
    1. Click the Add icon (Add icon) to create a new data source.
    2. Select the new data source from the list, then click the Edit icon (Edit icon) to open the new data source in the Local Data Source Editor.
    3. From the General tab, enter a title, description, and key field ID for the data source.


      • Title: Identifies the local data source when creating a list of values. The title only appears in designer windows, such as the List of Values tab in the Business Object Field Editor.
      • Description: (Optional) Helps workbook developers understand the purpose and use of the data source. The description only appears in the designer.
      • Key Field ID: The unique key for identifying the data in the local data source. In this example, the key field ID is flag. You'll create this key field from the Field tab, as described in the next steps.

        When exporting strings for translation, rows are identified by their key field values. Key field values themselves are not translated.

  5. From the Fields tab, create fields for the data source.
    In this example, you will create two fields: one with a Boolean data type (flag) and the other with a string data type (display). flag is the key field ID in our example. display stores the values that appear in the list.

    Note:

    In some cases, you may want to show just the identity values ("True" and "False" instead of "Yes" and "No") to your business users. In this situation, create one field and use it later as both the identity field and display field in your LOV.
    1. Click the Add icon (Add icon).
    2. Select the new field from the list, then click the Edit icon (Edit icon) to open the field in the Local Data Source Field Editor.
    3. Provide details for the field, then click Done.


      The value you type into the ID field should match the value you entered into the Key Field ID field previously. In this example, type in flag for the ID field and choose "Boolean" from the "Data Type" list.

      Also, provide a title and description for the field. These values help workbook developers identify the field when displayed in designer windows.

      Note:

      The ID, Title, and Data Type fields are required. The Description field is optional.
    4. Repeat these steps for the next field. In this example, create the display field for your data source, using "String" for the data type.

    Note:

    Make sure all the fields are configured properly before opening the Data tab, as described in the next step. If you make any changes in the Fields tab, any data entered in the Data tab is cleared.
  6. From the Data tab, add values to your data source in the newly-created fields.

    In this example, the Flag (key ID) field has a Boolean data type and displays check boxes for the expected values. Select the check box for "True" and leave it unselected for "False".

    Then, enter the user-friendly value (for example, "Yes" for the selected check box) in the Display field, as shown in this image.



    To add a row, select the last row and press Enter. To delete a row, select it and press Delete. To select more than one row, use the Shift key.

  7. Click Done.

Now that you have created a local data source, you are ready to use it as the data source for an LOV. See Configure a List of Values with a Local Data Source.

Configure a List of Values with a Local Data Source

Configure a list of values that references a local data source. Lists of values are supported for business object fields, custom action payload fields, and row finder variables.

Local data sources are listed along with business objects in the Choose a Data Source window when you configure your LOV. If you need to create a local data source first, see Create a Local Data Source for a List of Values.

When a business user selects a cell from the personal column in the Computer layout, a popup window shows a list of values drawn from your local data source for the user to choose from.

You can configure a list of values to show more than one display field in the popup window. The add-in shows all the display fields, in separate columns, in the popup window but only those you configure are shown in the Excel cell. If you choose to show more than one field in the cell, the values are concatenated.

Note:

Lists of values based on local data sources do not support filters or search in the drop-down list.

To create a list of values with a local data source:

  1. From the Layout Designer, click the Edit (Edit icon) icon next to the Business Object field.
  2. From the Business Object Editor, click the Fields tab, then select the business object's field.
  3. Click the Edit (Edit icon) icon to open the Business Object Field Editor, then click the List of Values tab.
  4. Select the Enabled check box on the List of Values page.
  5. Click the Edit (Edit icon) icon next to the Data Source field, then pick an appropriate local data source.


    This data source provides the display values for the corresponding identity values.

  6. Click the Edit (Edit icon) icon next to the Identity Field field, then choose the appropriate identity field from the local data source.
    This is the field used to look up the display values for the identity values in the current field.
  7. Click the Add Field (Add Field icon) icon to open the Available Business Object Fields Editor, then choose the desired display field.

    These fields come from the data source and are shown instead of the identity values where this field is used in a layout.

    You can choose multiple display fields for one list of values. Repeat this step to add additional display values.

  8. For each display field, select either Picker and cell or Picker only from the Display Type list.

    If you configured only one display field, use Picker and cell to display the value in both the Excel cell and the popup window. For additional display fields, use Picker only if you don't want to display the value in the Excel cell.

    Note:

    When configuring the display values, make sure the information in the cell is unique and meaningful for your business users. Take for example a Contact field in your layout. To ensure your business users have enough information to determine the right contact for a purchase order, you may want to include the contact name, company, and email as display fields in the Excel cell. In this case, ensure that the display type for these display fields are set to Picker and cell.
  9. Click Done.

During runtime, the business user sees the user-friendly values from the display field of the data source in the LOV, as shown here:



The choice list will appear wherever that business object or payload field appears. For the row finder variable, the choice list will appear wherever that row finder variable appears during download.

The add-in caches the data of list of values in the workbook. After you modify the configuration of any list of values, click Clear List of Values Cache from the Advanced menu.