Formula Compilation Errors

Compilation errors are displayed in the Fast Formulas page after you compile the formula. The compiler stops the compilation process when it encounters an error. Error messages display the line number and the type of error.

Common Compilation Errors

Here's some of the common formula compilation errors.

Formula Compilation Error

Description

Syntax Error

The formula text violates the grammatical rules for the formula language. For example, if you use IF1 instead of IF in an IF statement.

Incorrect Statement Order

ALIAS, DEFAULT, or INPUT statements come after other statements.

Misuse of ASSIGNMENT Statement

Occurs when any of these conditions exist:

  • An ASSIGNMENT assigns a value to a database item.

  • A context is assigned a value externally to a CHANGE_CONTEXTS statement.

  • The formula assigns a value to a non-context variable within a CHANGE_CONTEXTS statement.

You can use CHANGE_CONTEXTS statements in a formula.

Misuse of ALIAS Statement

You can use an ALIAS statement only for a database item.

Missing DEFAULT Statement

A database item that specifies a default value must have a DEFAULT statement.

Misuse of DEFAULT Statement

You specify a DEFAULT statement for a variable other than as an input or a database item.

Uninitialized Variable

The compiler detects that a variable is uninitialized when used. The compiler can't do this in all cases. This error often occurs when the formula includes a database item that requires contexts that the formula type doesn't support. The formula treats the database item as a local variable. For example, balance database items require the PAYROLL_REL_ACTION_ID, PAYROLL_ASSIGNMENT_ID and CALC_BREAKDOWN_ID contexts. Typically, you use these statements in formulas of type Oracle Payroll.

Missing Function Call

The compiler doesn't recognize a function call. The combination of return type, function name, and parameter types doesn't match any available function.

Incorrect Operator Usage

An instance of a formula operator use doesn't match the permitted uses of that operator.

For example, the + operator has two permitted uses. The operands are both of data type NUMBER, or both of data type TEXT.

Inconsistent Data Type Usage

The formula uses a formula variable of more than one data type. Or the formula uses a database item or context with the wrong data type.

For example, Variable A is assigned a NUMBER value at the start of the formula, but is assigned a TEXT value later in the formula.

EXIT Statement Not Within WHILE Loop

A condition that eventually becomes false or an EXIT call for exiting the loop doesn't exist.

Misuse of Context

The formula uses a variable as a context, or a context as a variable.

For example, a formula assigns a value to AREA1 as an ordinary variable, but later uses AREA1 as a context in a GET_CONTEXT call.