Filter Expression Functions

Arkance Systems Benelux

CONVERT()


Converts given expression to a specified .NET Framework type. All conversions are valid with the following exceptions: Boolean can be coerced to and from Byte, SByte, Int16, Int32, Int64, UInt16, UInt32, UInt64, String and itself only. Char can be coerced to and from Int32, UInt32, String, and itself only. DateTime can be coerced to and from String and itself only. TimeSpan can be coerced to and from String and itself only.


Function uses following syntax:


CONVERT(expression, type)


Example:


CONVERT([MyStringProperty], 'System.Int32')


LEN()


Returns the length of a specified string.


Function uses following syntax:


LEN(expression)


Example:


LEN([MyStringProperty])


ISNULL()


Function takes two parameters: an expression and a replacement value. If the expression resolves to a non-NULL value, then the value of the expression is returned. If the expression resolves to NULL (Nothing or DBNull), the replacement value is returned. Replacement value needs to be of expected property type.


Function uses following syntax:


ISNULL(expression, replacement)


For example, suppose you want to display the MyStringProperty property for a named feature, but if the MyStringProperty property is NULL, you want to evaluate property value to "Empty":


ISNULL([MyStringProperty], 'Empty')

ISNULL([MyNumericProperty], -1)


IF()


Returns one of the two values depending on the result of a logical expression. Conditional branching may depend on some other conditional branching within the same expression.


Function uses following syntax:


IF(expression, truepart, falsepart)


Example:


IF([MyNumericProperty] >= 1, 'High', 'Low')

IF([MyStringProperty] = 'High', 1, 0)


TRIM()


Removes all leading and trailing blank characters like \r,\n,\t, ' ', etc.


Function uses following syntax:


TRIM(expression)


Example:


TRIM([MyStringProperty])


SUBSTRING()


Returns a substring of a specified length, starting at a specified point in the string.


Function uses following syntax:


SUBSTRING(expression, start, length)


Example:


SUBSTRING([MyStringProperty], 7, 8)