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:
- Open the BOM class in the BOM editor.
- In the Domain section, click Create
a domain.
- Select , and then click Next.
- In the Excel File field, select
the Excel file that you added to the resources folder
of your rule project.
- In the Sheet field, select the sheet
for the domain provider.
- 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.
- 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.
- Click Finish, or click Next to
add custom properties to the values.
- 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.
- Enter the name of your custom property.
- 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.