Previous Topic: Null Update Suppression Logic

Next Topic: CRTOBJ  Database Function

CNT Function Field

The Count (CNT) function field is a field usage type used within certain functions (EDTTRN, DSPTRN, PRTFIL, and PRTOBJ) to define a count of a set of records. The CNT function field must be based on one of the fields in the record format.

In order for CNT to determine which records to count, you must point it to a record on the device. To do this, CNT must reference one of the fields in the record. The actual field selected and the values in that field do not affect the result of the CNT function. The CNT field itself must be a numeric field.

CNT function fields always have two parameters:

Note: If you reference this function field to another field, that field defaults to the input parameter of the CNT function field.

Examples of Count fields: