I don't have a copy to test, but does FMP 8.0v3 support global variables?
Yes, FM8 supports global variables.
Where is the focus when this script step runs? Is it in the portal row or is it in the parent record? FileMaker changed from 7 to 8 and again in 8.5 as far as the context from which counts and sums are evaluated. It should always work correctly when evaluated from the layout's parent record, but may not work as expected if trying to evaluate from within a portal.
from the parent record.
i don't understand what is going on but it is frustrating.
Thank you for your post, and I apologize for the late reply.
I don't have a version of 8.0, but I do have version 8.5. With the limited testing I have done, your script step works. However, I know there is a lot more happening in your script, so I would like to see a clone of your file so I can do some more testing here. I will also try to find a copy of FileMaker Pro 8 in the interim.
I have sent you a private message (top of this page - right side - X Messages) with instructions where to send the file.