Error Messages/42402
Error message
In the first parameter to SysFunction Table, Variable 'X' does not have a discrete domain with explicit values, and hence, it does not have a domain index. Therefore, 'Domain of X' cannot be used as a Table index.
Cause
Beginning in Analytica 4.3, a variable may have both an IndexValue (such as a self index) and a domain index, where the domain index is distinct from the IndexValue. A variable has a domain index only in the case in which its domain is defined as a discrete list of possible values. That discrete list of values become the index values for the domain index.
The error you have encountered occurs when you have attempted to use a domain index as a table index, defining your table using a syntax such as:
- Table(domain of X)(...)
when X does not have a domain index. In other words, the domain of X is not defined as a discrete list of possible values.
The explicit list of values must be a simple list of explicit values to be used as a table index. Using the advanced domain-expression functionality, it is possible to define arrays of discrete value sets (which are of use in certain places), but these are not recognized as valid table indexes.
Remedy
First, make sure your intention is to use the domain index as the Table index. That in itself is a bit unusual, but is allowed.
Next, edit the domain of your index variable and set it to a discrete list of explicit values (or to an index identifier to copy the values from an existing index), or to an expression that computes a list.
Enable comment auto-refresher