Count and sum expressions in business rules

You enter both count and sum expression types in the same way. These expressions can include a Boolean condition to filter the list.

The following are examples of count and sum expressions:

  • Sum the new vehicle cost of all convertibles, coupe, and four-door sedans:

    the sum of

    vehicle.CostNew for each personalVehicle in the vehicles list

    where vehicle.BodyType Is In "Convertible", "Coupe", "Four-door sedan"

  • Count the number of drivers over the age of 18:

    The count of

      each policyDriver in the policyDrivers list

      where policyDriver.Age > 18