fieldCondition



Function: fieldCondition

Returns a Pipe Filter Condition that can then be added to an andCondition() or to an orCondition() to construct a Pipe Filter which may then be used to perform a lookup on a Pipe.

Syntax

fieldCondition(attributeName, comparator, value)

ArgumentTypeDescription
attributeNameStringA String containing the name of the Stream Attribute whose value is to be compared.
comparatorComparatorThe type of comparison to carry out (see Comparator)

Example

$filter = andCondition(), 
$filter = addElement( $filter, 
fieldCondition( "EventTypeId", _EQUALS, in.eventType) ), 
$filter = addElement( $filter, fieldCondition( "CatalogueId", _EQUALS, 3) ), 
setFilter( eventTypes, $filter )

Creates the Pipe Filter EventTypeId == in.eventType AND CatalogueId == 3 which is then assigned to the Pipe eventTypes using setFilter().

See Also