Understanding Errors

The formula editor has built-in validations for syntax and data type errors in formulas. If there is an issue, an alert will be displayed, along with information to help you to troubleshoot the errors.

The formula editor reports errors that will prevent the formula from running. However, it cannot determine whether the result will do what was intended.

If the formula is incomplete, the error displayed will remain until it is corrected. Hold the cursor over the error indicator to see more information. Here the token is expected error indicates that the formula expression is incomplete, it will also indicate where a token is expected.

The token could be a number or parentheses to further build on the incomplete formula. The token could also be any other element, such as a comma, that is missing and so makes the equation invalid.

A warning is displayed when there is a mistake in the input, e.g. if the input cannot be used in the calculation or if it is not recognised. Here, the input column Original Sample Weightt is misspelled, which is indicated by a yellow line. To fix this error, correct the spelling. You can also remove the error by clicking remove in the error message:

If a date column type has been selected but the expected result for the value of the formula is not going to be a date, an error will be displayed:

Certain date functions are also not compatible with the date column type. When this is the case, an error message of The result of the formula is not a date will be displayed. To fix this error, change the column type.

In some cases, if the formula is invalid you will receive an Invalid formula error message:

If the formula includes inputs that will not work with the selected function, the An argument of the function has an inappropriate type error will be displayed: