Appendix 5: Formula Errors: Run time

Here are the descriptions of the various formula errors during the run time:

Formula errors table

Formula Error Description
Uninitialized Context A context is not set when required for a database item or function call.
Uninitialized Variable Where the formula compiler cannot fully determine whether or not a variable or context is initialized when used, it generates code to test whether or not the variable is initialized.

When the formula executes and the variable or context is not initialized an error is raised.

Divide by Zero This error is raised when a numeric value is divided by zero.
No Data Found This error is raised when a database item of a non-array type unexpectedly fails to return any data. If the database item can return no data then it should allow defaulting.

This error can also be raised from within a formula function. The cause is an error in the formula function code.

Too Many Rows This error is raised when a database item of a non-array type unexpectedly returns more than a single row of data. The cause is an incorrect assumption made about the data being accessed.

This error can also be raised from within a formula function. The cause is an error in the formula function code.

NULL Data Found This error is raised when a database item unexpectedly returns a NULL data value.

If the database item can return a NULL value then it should allow defaulting.

Value Exceeded Allowable Range This error is raised for a variety of reasons such as exceeding the maximum allowable length of a string.
Invalid Number This error is raised when an attempt is made to convert a non-numeric string to a number.
User Defined Function Error This error is raised from within a formula function. The error message text is output as part of the formula error message.
External Function Call Error A formula function returned an error, but did not provide any additional information to the formula code. The function might have output error information to the logging destination for the executing code.
Function Returned NULL Value A formula function returned a NULL value.
Too Many Iterations A single WHILE loop, or a combination of WHILE loops, has exceeded the maximum number of permitted iterations. The error is raised to terminate loops that could go on forever. This indicates a programming error within the formula.
Array Data Value Not Set The formula attempted to access an array index that has no data value. This is an error in the formula code.
Invalid Type Parameter for WSA_EXISTS An invalid data type was specified in the WSA_EXISTS call.
Incorrect Data Type For Stored Item When retrieving an item using WSA_GET, the item's actual data type does not match that of the stored item. This is an error within the calling formula.
Called Formula Not Found The called formula could not be resolved when attempting to call a formula from a formula. This could be due to an error in the calling formula, or because of installation issues.
Recursive Formula Call An attempt was made to call a formula from itself. The call could be directly or indirectly via another called formula. Recursive formula calling is not permitted.
Input Has Different Types In Called and Calling Formulas When calling a formula from a formula, the actual formula input data type within the called formula does not match the data type specified from the calling formula.
Output Has Different Types In Called and Calling Formulas When calling a formula from a formula, the actual formula output data type within the called formula does not match the data type specified from the calling formula.
Too Many Formula Calls There are two many formula from formula calls. This is a problem with the formulas.