When you save an expression, it is always checked to be sure it is valid. You can also check whether your expression is valid before you save it.
The validation checks the syntax of the expression, whether the specified properties are present in the current data store, and whether the property values are valid.
When possible, the validation operation displays a message describing the errors it finds. Often, you can click this error message to place the cursor at the problem spot so you can correct it.
Validation can fail for one of the following reasons:
- A separator character is missing or invalid. For example, for some functions, commas must separate each argument. Perhaps one of the commas is missing, or you entered a semicolon instead of a comma.
- An operator or property is missing. This problem is common in expressions with multiple conditions. For example, the expression PARCEL_VALUE > 100000 AND <200000 is invalid. The correct syntax is PARCEL_VALUE > 100000 AND PARCEL_VALUE < 200000. Notice that in the second example, PARCEL_VALUE appears twice, while in the first example it appears only once.
- A character or property is the wrong type. This problem can occur if you use an operator that requires a numeric value, but you inserted a text character instead. For a function that requires a hexadecimal value, a numeral can cause an error. For a function that requires a numeric property, a text property causes an error.
- A required value is missing or “empty.” Perhaps you failed to insert a property value or a value for an argument.
- The expression is missing a bracket, quotation mark, or parenthesis character. For example, there is an opening bracket that has no related closing bracket. This problem is common in complex expressions.
The validation process can help you avoid many errors, but it cannot guarantee that your expression will work the way you intend when it is applied. Validation does not execute the query against actual data. It only checks that the expression syntax is correct and that the properties and values are valid for the current data store.