Skip Headers
Oracle® Communications Design Studio Modeling Inventory
Release 7.2.4
Go to Design Studio Help Home
Go to Table of Contents
Go to Feedback page

Go to previous page
Go to next page
Mobi · ePub

Populating Drop-Down Lists with Query Results

You can populate drop-down lists with the results of a query that you define. You use Java Persistence Query Language (JPQL) commands to write the query to search for values that are stored in instance data.

To populate a drop-down list from the results of a query:

  1. Open the Data Schema editor.

  2. In the Dictionary area, select a data element.

    The data element subtabs appear in the Element area.

  3. Click the Settings tab.

  4. In the Control Type field, ensure that DropDown is selected.

  5. Click the Characteristics tab.

  6. In the Drop Down Options field, select Query.

  7. (Optional) Do one of the following:

    • Click Select.

      The Element Selection dialog box appears. You can select a characteristic to use in a filtered data query. When you use a filtered data query, you must include in the query string a "?" to indicate where in the query the characteristic parameter is to be used.

    • Click Parameter.

      The Create Data Schema Element dialog box appears. You can create a new characteristic for use in the filtered data query.

  8. In the Body field, enter a JPQL query.

    For example, you can create a City Name characteristic as a drop-down list populated with all GeographicPlace instances created from the City specification.

    The query for this data is as follows:

    Select name from GeographicPlace where specification.name.contains(”City”)
    
  9. From the File menu, select Save.