Populating Drop-Down Lists with Entity Links Using Existing Specifications

Entity links enable you to populate the drop-down list with the names of all entities created from the selected specification. For example, if you specify a Logical Device specification named Customer Edge Router, the drop-down list includes the names of all Logical Device instances created from the Customer Edge Router specification.

Also, you can use SQL commands to filter the entity instances for a selected entity link. By default, the drop-down list is populated with label and value pairs. For example, if you define a Logical Device instance with the ID 1234 and with the name as LD1, the label in drop-down displays 1234-LD1. You can change the default behavior of a drop-down label by writing the custom extension for the following API:

CharacteristicHelper.getEntityLinkDisplaySelectSQL()

To populate a drop-down list with the names of entity instances created from an existing specification:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the Dictionary tab.

  3. Select the data element that you want to tag as a characteristic.

    The Data Element tab appears in the Data Schema editor.

  4. Click the Settings tab.

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

    See “About Control Types" for more information.

  6. Click the Characteristics tab.

    The fields on this tab are read-only if the data element is not tagged as a characteristic. See "Tagging Data Elements as Characteristics" for more information.

  7. In the Drop Down Options field, select Entity Link.

  8. In the Entity Link area, click Select.

    The Entity Selection dialog box appears, containing a list of available specifications.

  9. Select a specification in the list.

    To shorten the list of specifications, enter characters in the Select an item to open field. The list displays specifications whose names begin with the characters you enter. You can use the wildcard characters shown in the dialog box.

  10. Click OK.

    The specification you selected is displayed in the Entity Link area.

  11. (Optional) To view the selected specification in its editor, click the Entity link.

  12. (Optional) To remove a selected specification from the Entity Link area, click Clear.

  13. (Optional) In the Parameters field, do one of the following:

    • To select a characteristic to use in a filtered SQL query, click Select. The Add Element Selection dialog box appears.

      When you use a filtered data query, you must use the following syntax to indicate where in the query the characteristic parameter is to be used:

      :Characteristic Parameter Name

      For example, if you select Char1 in the Parameters table, then you would include the following parameter binding in the additional SQL filter:

      :Char1

    • To create a new characteristic for use in the filtered data query, click the Parameter link.

      The Create Data Schema Element dialog box appears.

  14. (Optional) To enter an additional SQL filter, enter the filter in the Body field.

  15. From the File menu, select Save.