$FieldgroupOccurrence
Available as of Model 204 version 7.5.
The $FIELDGROUPOCCURRENCE function returns the current occurrence number of the field group.
For example:
FOR EACH OCCURRENCE OF FIELDGROUP REDSOX PRINT $FIELDGROUPOCCURRENCE CALL CHANGINGPROC PRINT $FIELDGROUPOCCURRENCE END FOR
This example might print a different value before and after the CHANGINGPROC if the procedure inserted or deleted the field group occurrence before the current one.
$FIELDGROUPOCCURRENCE returns 0 if the current field group has been deleted.