Reference > Rule Languages > Business Action Language > BAL Constructs > the number of <objects>

Summary

Returns the number of objects in the current data set or in the specified collection.

Syntax

the number of <objects> [in <list>] [where <test>,*]

Description

The the number of <objects> counts the number of objects of the specified type and returns the total as a number. You can use the optional in <list> clause to count the objects in a specific list. You can use one or more optional where clauses to apply additional conditions to the objects that are included in the returned count.

This construct cannot be used in the definitions part of the rule.

Example

The following condition is met if there are at least 6 vehicles:

if
    the number of vehicles is more than 5
then...

Related Concepts

Rule Conditions

Related Tasks

Creating Business Rules

Related Reference

definitions
if
in <list>
where <test>

Related Samples and Tutorials

Tutorial: Creating Business Rules