in (list)
This construct defines a local variable in the rule that you can use to access objects
from a collection.
Purpose
You use this construct in the definition or condition part of a rule to access objects from collections.
Syntax
in <list>
Description
The in construct is used to retrieve data from a
collection of objects, and creates a variable that you can use in the rule to refer to this data.
The <list> parameter of the in
construct must be an expression that denotes a collection.
The in construct can be used in the definitions part of a rule and in count conditions specified in
the if part of a rule.
Example
The following definition declares a variable as an item in the collection of shopping cart items.
definitions
set item to a CD
in the items of the shopping cart of customer ;
if
there is an item
then...
The following condition tests that there is an item in the collection of shopping cart items.
if
there is an item
in the items of the shopping cart of customer ;
then...