Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt
hiddentrue

andCondition() Returns an empty AND Pipe Filter Clause object which can be populated with Pipe Filter Conditions to build up a dynamic (script-defined) Pipe Filter.


Function: andCondition()

Returns an empty AND Pipe Filter Clause object which can be populated with Pipe Filter Conditions to build up a dynamic (script-defined) Pipe Filter. The Pipe Filter can then be used to fetch data from a Pipe.

...

Syntax

andCondition()

Examples

Code Block
do ( 
	// First build up the filter 
	$filter = andCondition[], 
	$filter = addElement($filter, fieldCondition("productId", _EQUALS, in.productId) ), 
	$filter = addElement($filter, fieldCondition("productStatus", _EQUALS, "OK" )), 

	// set the filter on the Pipe 
	setFilter( prodLookup, $filter ), 
	
	// now lookup on the pipe lookup (prodLookup), 
	$prodName = prodLookup.name 
)


do ( // First build up the filter $filter = andCondition(), $filter = addElement($filter, fieldCondition("productId", _EQUALS, in.productId) ), $filter = addElement($filter, fieldCondition("productStatus", _EQUALS, "OK" )), // set the filter on the Pipe setFilter( prodLookup, $filter ), // now lookup on the pipe lookup (prodLookup), $prodName = prodLookup.name )

This example creates an AND clause which specifies that the Attribute productID productId must equal the value currently held in in.productId AND the productStatus Attribute in the target Pipe must equal "OK". The filter is then assigned to the Pipe prodLookup and a lookup is performed by invoking the lookup() function.

...