Creating dynamic domains from Excel

Create a dynamic domain and populate it with data from an Excel file.

Before you begin

You can create a dynamic domain with values extracted from an Excel file.

Make sure that the Excel file containing the values to populate the enumerated domain has the correct structure, see Excel domain provider.

Important:

Make sure that the Excel file is in the resources folder of your rule project.

Procedure

To create a dynamic domain from an Excel file:

  1. Open the BOM class in the BOM editor.
  2. In the Domain section, click Create a domain.
  3. Select Dynamic Domains > Excel, and then click Next.
  4. In the Excel File field, select the Excel file that you added to the resources folder of your rule project.
  5. In the Sheet field, select the sheet for the domain provider.
  6. Select the Table with header check-box if you have created a header in your Excel file.

    Selecting this check-box displays the name of the columns in the drop-down lists instead of the default column letters.

  7. In the Value column, BOM to XOM column, and Label column fields select the corresponding columns in your Excel file.

    In the Label column, you must select at least the label column for the default locale.

  8. Click Finish, or click Next to add custom properties to the values.
  9. Optional: Click Add to add a custom property.
    Note:

    If you use Excel domains in COBOL, you must add the cobolDomainValue property and select the column that you have created for COBOL values.

    1. Enter the name of your custom property.
    2. Select the corresponding column in your Excel file.

Results

The values of the dynamic domain are displayed in the BOM editor.

The values are also available in the completion menu of the rule editor. You can now use them when editing your rules.

If you have defined labels or documentation for other locales, you must update the BOM for each locale. To do so, you must restart Rule Designer in the locale to update, and synchronize the BOM with the values in the Excel file. For more information, see Updating a single dynamic domain and Updating all dynamic domains.