To loop through a set of records:
Perform a find to find your records
Sort them if the order is important
Go To Record [ First ]
Do what you need to do with this record
Go To Record [ Next ; Exit after last ]
The "exit after last" parameter will exit the loop for you after you have reached the last record.
oh. hahaha. that was easy. totally forgot about that. thanks!
Once upon a time, Go To Record [ next ; Exit after last ] was the only way you could control a loop in FileMaker! Scripts were pretty limited back then!