Enumerations retrieved from a database
If you want your custom data type to gets its enumerated labels and values from a database, then you need to define the database table and columns that will be accessed.
This topic covers the significant points of this feature in the context of the Vocabulary.
When your Vocabulary has a verified connection to a supported database, the Custom Data Types tab presents three additional columns, as shown:
Figure 21. Custom Data Type columns for defining database retrieval
These columns are how you specify:
Lookup Table Name - The database syntax that specifies the table that has the enumerations.
Labels Column - The column in the lookup table that holds the label. This is optional as you can elect to use only values.
Values Column - The column in the lookup table that holds the value associated with the label, or the solitary value. This is required.
The following examples show two options:
Figure 22. SQL Server table with values to use in the Vocabulary
The value data is retrieved into the Vocabulary as highlighted:
Figure 23. Definition and retrieved values in the Corticon Studio
Another example retrieves name-value pairs.
Figure 24. SQL Server table with labels and values to use in the Vocabulary
The label-value data is retrieved into the Vocabulary as highlighted:
Figure 25. Definition and retrieved label-values in the Corticon Studio