English

Error: No features found. Could not verify expression.

Error Message

When attempting to verify or execute an advanced Java Script labeling expression, the following error occurs:

"No features found. Could not verify expression."

Cause

The labeling expression parser expects a field name to be enclosed in square brackets. In Java Script, the square brackets refer to functions such as an array, which results in the error.

Solution or Workaround

Use VBScript instead of Java Script to return an array in the labeling expression. An example of a Java Script function that produces the error and the VBScript equivalent that executes are shown below.

Java Script example which produces the error:

Code:
function FindLabel ( [Name] )
{
var strArray = [Name].split(" ");
return( strArray[0] );
}


VBScript equivalent that works:

Code:
Function FindLabel ( [Name] )
dim pArr
dim pStr
pArr = split([Name]," ")
pStr = pArr(0)
FindLabel = pStr
End Function