...
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
) |
...
Note that you can add as many Pipe Filter Conditions as you need to the AND Pipe Filter Clause.
Nested Example
Code Block |
---|
do( $filter = andCondition(), $filter = addElement($filter, fieldCondition("productId", _EQUALS, in.productId)), $filter = addElement($filter, fieldCondition("productStatus", _EQUALS, "OK")), $filter = addElement($filter, fieldCondition("productClass", _EQUALS, "RETAIL" )), .... |
...
) Clauses can also be nested: |
...
do( $statusCond = andCondition(), $statusCond = addElement($statusCond, fieldCondition("productStatus", _EQUALS, "GOOD" )), $filter = andCondition(), $filter = addElement($filter, fieldCondition("productId", _EQUALS, in.productId) ), $filter = addElement($filter, $statusCond), .... ) |