repcnt

Syntax

number = REPCNT(tag)

Arguments

number: integer

tag: database variable

Meaning

If tag is not part of a data dictionary field group, REPCNT counts the number of occurrences of the tag, up to and including the last filled occurrence; trailing empty occurrences don't exist in the database.
If tag is part of a data dictionary field group, REPCNT counts the maximum number of occurrences of any field in the field group, up to and including the last filled occurrence. An empty last field group occurrence is not counted while if only one of the fields in the last field group occurrence is filled in, that last field group occurrence is counted indeed. Empty field group occurrences somewhere in between are always counted.
To count the total number of occurrences of multilingual fields up to and including the last occurrence that has a value in at least one data language, simply write your code as if the field wasn't multilingual, according to the syntax: number = repcnt(tag). Any empty occurrences in between will be counted as well.

Example

number = repcnt (A1)

Result

number takes as value the number of occurrences of the tag A1.