Multiple-Value Characteristics in Table Calls
Use
Only single-value characteristics should be used in tables.
Multiple-value characteristics cause problems when dependencies are processed.If a characteristic of the class is multiple value, create a single-value characteristic with the same data type and allowed values and reference it to the characteristic of the class.
Class BIKE contains multiple-value characteristic EXTRAS and single-value characteristic MODEL.
You want to define a table so that the extras for the bike depend on the model.To do this, you create characteristic EXTRAS_SINGLE for the table.
Characteristic MODEL is single-value, so it does not need a special characteristic for the table.In the table, enter the value combinations for MODEL and EXTRAS_SINGLE.
Create an action that compares the single-value characteristic with the multiple-value characteristic:
TABLE Extras
(Model = Model,
Extras_single = $Self.Extras)
Features
Setting Values for a Multiple-Value Characteristic
A table must always set unique values.
This means that you can only use a table to set one value for a multiple-value characteristic.Table Extras01
MODEL |
EXTRAS_SINGLE |
JOURNEY |
Stand |
CITY |
Basket |
COUNTRY |
Mudguard |
The table cannot set both a stand and a basket as extras for one model.
Multiple-Value Characteristics in Conditions
You cannot use a condition to compare a single-value characteristic in a table with a multiple-value characteristic in a class, because this produces an ambiguous statement.
For example, you cannot use the following table call in a precondition:
TABLE Extras
(Model = Model,
Extras_single = Extras)
The system cannot interpret the comparison between EXTRAS_SINGLE and EXTRAS, and therefore cannot tell whether the condition is fulfilled:
See also:
Restricting Characteristics with a Variant Table