This document provides information on how to process rows in a child collection. The process described below demonstrates how to set the attribute of a property on all the rows of a child class.
The code to process rows in a child collection should go under the "CURPTH" class path for the corresponding child collection, rather than under the main class.
Example:
CURPTH = "[child class]"), the Supervisor executes these events once per collection row: $METHODS
Case CURPTH
When "[child class]"
Case ACTION
When "AREAD_AFTER"
Gosub ACTIVATE_FIELDS
Endcase
Endcase
Return $ACTIVATE_FIELDS
ASTATUS = fmet this.ASETATTRIBUTE("PROPERTY",...
ReturnCURPTH = "main_class_name"), the code is more complex. The Supervisor executes these events once for the entire entity: $METHODS
Case CURPTH
When ""
Case ACTION
When "AREAD_AFTER"
Gosub ACTIVATE_FIELDS
Endcase
Endcase
ReturnCHILD(I) might not exist, and that deleted lines may still be there: $ACTIVATE_FIELDS
For I = 1 To maxtab(this.CHILD)
If this.CHILD(I)<>null and find(this.ASTALIN,[V]CST_ADEL,[V]CST_ANEWDEL)=0
ASTATUS = fmet this.CHILD(I).ASETATTRIBUTE("PROPERTY",...
Endif
Next
ReturnWe recommend that you use the first method to avoid unnecessary loops, and to avoid dealing with indexes in a collection.