Error Messages/42401

Example Error Messages

In Analytica 4.4:

 Syntax error:
 The first parameter of SysFunction Table must be an index.
 Do you want to edit the definition of Op_plan_data?

In Analytica 4.5:

 Syntax error while checking Op_plan_data:
 The first Table index, Fiscal_yyqq_op_plan, in the definition of Op_plan_data, must be an index.
 This prevents the index Segments, and all tables that use Segments, from being spliced to reflect changes 
 that have occurred since the index value of Segments changed.


This error occurs when a variable that is used in a Table is not a valid index. To be a valid index, it needs to evaluate to a list of elements. It cannot be an array.

A 1-D array is not a List

One tricky thing about this error is that your index variable must be a list, and not a 1-D array. These are not quite the same -- while both are 1-dimensional, a 1-D array is an array that is indexed by some other index.

Some expressions that you might use to compute an index value may result in a 1-D array. To convert these to a list, wrap your current index defintion inside a call to CopyIndex(...).

Occurs during splicing

This error message can be very confusing when it occurs during Table Splicing. For example, you may see this when you attempt to view (or evaluate) an edit table. After studying your Table definition for a while, you are certain that all the table indexes are indeed valid indexes. So why did this error occur?

The reason it occurs is because it encounters this problem during a Table Splicing operation, so the problem isn't with the table you are trying to view -- it is with a table that shares one of its indexes. Be patient -- this can be quite confusing and a little challenging to figure out. But understanding why it is happening will help you to find where the problem is.

Suppose you have two tables:

Variable A := Table(I, J)
Variable B := Table(J, K)

You try to view the edit table for A and this error occurs because index K is bad. This happens when J is unspliced.

How does J get to be unspliced? When you change the values of an index, it becomes unspliced. Analytica needs to adjust all the table definitions that use that index, adding, removing, or rearranging rows to reflect the change you just made to that index. This adjustment of table definitions when an index changes is called Table Splicing. Normally it happens automatically and you may never be aware of it, but in this case, it can't adjust all the tables that use J because it can't access B while index K is invalid. Until J is spliced, you will not be able to view or evaluate any edit tables that use J. Hence, in order to view or evaluate A, you will have to fix K.

In Analytica 4.4, the error message does not properly point you to the correct problem. In the above example, it says "Do you want to edit A?". Of course, when looking at A, there doesn't seem to be a problem. Because of that, figuring out which index is to blame is tricky. What you do know is that the bad index is an index of a sibling table (a sibling table is one that shared an table index with the current table). In some models, where you have a lot of high-dimensional sibling tables, the search can be daunting. There isn't an easy magic bullet here, other than understanding how this arises.

It occurs to me that in a really tough case, it might be worth writing some Analytica code to find a bad unspliced index. To spot it, you would look for an object with IsNull(Att__CachedIndexVals) and not IsNull(Att_PrevIndexValue). This would be an option only if you are fairly well versed in Meta-inference in Analytica already. If you are reading this after 4.5 has been released (or is in beta), your best option might be to install 4.5 and try it there. See the second example error message above to see how much more informative it is.

See Also


You are not allowed to post comments.