skip to main content
Corticon Studio: Rule Modeling Guide : Building the Vocabulary : Custom Data Types : Enumerations : Enumerations defined in the Vocabulary
 

Try Corticon Now
Enumerations defined in the Vocabulary
To set up an Enumeration, open the project's Vocabulary, and then click on its root, Cargo in this tutorial example. Then enter a preferred unique name without spaces, and then click on the Base Data type cell of the row to choose the data type (the values are all red until you have added a successful value or label/value pair). Click on the Enumeration cell to choose Yes. Now enter a value on the first row, and a label if you want one. All the cells are validated and the red markers are cleared. Then you can add other value or label/value pairs on the next lines.
When you have completed a valid Custom Data Type, choose attributes in the Vocabulary that will be constrained to the enumeration.
If your custom data type is a local enumeration, then you enter the enumerated values of the base data type into the Value column, and, if you intend to use labels, enter label text into the Labels column.
Note: Pasting in labels and values - If you have the source data in a spreadsheet or text file, you can copy from the source and paste into the Vocabulary after you have defined the name, base data type, and chosen yes to enumeration. When you paste two columns of data, click on the first label row. If you have one column of data you want to use for both the label and the value, paste it in turn into each column. If the data type is String, Date, Time, or DateTime, the paste action will add the required single quote marks.
The Label column is optional: you enter Labels only when you want to provide an easier-to-use or more intuitive set of names for your enumerated values.
The Value column is mandatory: you need to enter the enumerations in as many rows of the Value column as necessary to complete the enumerated set. Be sure to use normal syntax, so custom data types that extend String, DateTime, Date, or Time base data types must be enclosed in single quote characters.
Here are some examples of enumerated custom data types:
Figure 10. Custom Data Type, example 1
PrimeNumbers is an Integer-based, enumerated custom data type with Value-only set members.
Figure 11. Custom Data Type, example 2
packingType is a String-based, enumerated custom data type with Label/Value pairs.
Figure 12. Custom Data Type, example 3
USHolidays2015 is a Date-based, enumerated custom data type with Label/Value pairs.
Figure 13. Custom Data Type, example 4
ShirtSize is an Integer-based, enumerated custom data type with Label/Value pairs.
Figure 14. Custom Data Type, example 5
RiskProfile is an Integer-based, enumerated custom data type with Label/Value pairs
Figure 15. Custom Data Type, example 6
DevTeam is a String-based, enumerated custom data type with Value-only set members.
Use the Move Up or Move Down toolbar icons to change the order of Label/Value rows in the list.