| Reference > Rule Languages > Business Action Language > BAL Constructs > there is at least one <object> |
there is at least one <object> |
PREVIOUS NEXT |
Checks to see if there is at least one object of a given type in the current data set or the specified collection.
there is at least one <object> [in <list>] [where <test>,*]
Use this construct to determine if the current data set contains at least one occurrence of a particular object.
Use the optional in clause to apply the test to a specific collection of objects. Use one or more optional where clauses to filter the objects to be counted with one or more conditions.
This construct can only be used in the if part of a rule.
The following condition tests whether or not a Customer object exists.
if
there is at least one customer
where...
then...
The following condition tests if a senior Gold customer exists.
definitions
set `gold customers' to all customers
where the category of each customer is Gold;
if
there is at least one customer in `gold customers'
where the age of this customer is at least 60,
then...
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |