VBScript is the programming language that allows you to define expressions for the SearchExpression, SearchByDistance, SearchShape methods, Expression and LabelExpression properties. Documentation for VBScript is available from the following address: http://msdn.microsoft.com/scripting.
In addition to standard VBScript functions, the following functions are supported:
Returns one of two parts, depending on the evaluation of an expression.
IIF(expr, truepart, falsepart)
Expression you want to evaluate.
Value or expression returned if expr is True.
Value or expression returned if expr is False.
Map1("roads").LabelExpression = "IIF(ROAD_CODE = ""A41"", ROAD_CODE, """")"
Determines if a character expression matches a pattern.
Specifies the character expression LIKE( ) compares with pattern. expr must match pattern letter for letter in order for LIKE( ) to return True.
Specifies the pattern that LIKE( ) compares with expr. pattern can contain the wildcards such as * and ?. The question mark (?) matches any single character in expr and the asterisk (*) matches any number of characters.
recordset = Map1("streets").SearchExpression("LIKE(STREET_NAME, ""Main*"")")
The PCase function returns a string in proper case..
Specifies a string.
Layer.LabelExpression = "PCASE(
state = PCASE( "neW york" )
Output: "New York"