Notifications

67 views

Description

The '*** ERROR *** WhereClause - invalid token' is appearing in the application logs.

Release or Environment

London and later.

Cause

This error is produced when there is an unexpected character in the 'Where Clause' of a 'sys_db_view_table' record.

Resolution

When you write the Where clause, add the field name to the Variable prefix of its table with an underscore. For example, in a Where clause, mi_id refers to the id field in the Metric Instance [metric_instance] table (mi) and inc_sys_id refers to the sys_id field in the Incident [incident] table (inc). Users will often incorrectly reference fields using the standard javascript syntax 'inc.sys_id', when the Where clause is expecting 'inc_sys_id'.

The Where clause supports these JavaScript conditional operators for comparing table fields:

=, !=, <, <=, >, >=, &&, ||

More information is available here: https://docs.servicenow.com/bundle/madrid-platform-administration/page/use/reporting/task/t_AddATableToTheDatabaseView.html

Article Information

Last Updated:2019-10-15 07:00:20
Published:2019-10-15