COUNT-OF function
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Returns an INTEGER value that is the total number of selected records in the table or tables you are using across break groups.
Syntax
|
- break-group
- The name of a field or expression you named in the block header with
the
BREAK BYoption.
Note: The
COUNT-OF function requires a
sorted, preselected list of records. This sorted preselected list is not constructed if the
BREAK is by an active index because the compiler optimization knows the
list is already sorted. The Aggregate phrase function,
COUNT, gives the count of a break or sort group and may be more
appropriate. It does not require a preselection.Example
This procedure sorts all customers by state and then calculates the
percentage of the total number of customers that are in each state. The
COUNT-OF function provides the calculation with the number of customer
records in the database.
r-cntof.p
|