Iterating Subfile Rows
To iterate subfile rows you need to know when you have reached the last row in order to stop your logic. To do this use the CHECK_FIELD_EXISTS Function:
while ( CHECK_FIELD_EXISTS(sFindField,iInd) )
{
<your logic>
}
where sFindField is any of the named subfile fields.