December 11, 200223 yr Newbies This is probably simple, but I'm stuck. I have over 1000 account titles using up to 15 account numbers each, one record per transaction. Now I need to make a report: per title, summary of transactions by groups of accounts. I have the layout and the loop to clear the fields, check for account number, set field to transaction amount and do the calculations. BUT, I don't know how to tell it to: do the loop for each account title (as long as the title on the record is equal to the one on the previous record), and then clear the fields and start over with the next account title. Can anyone help me? TIA connie
December 11, 200223 yr Hello Connie, What you are describing is normally achieved in FileMaker by creating summary fields, and placing them on a layout within a sub-summary part. When done in this way, the aggregation of summary data relating to each of the titles (or whatever other value you tie your sub-summary part to) is handled automatically for you by FileMaker. Notwithstanding that, if you have reasons for wanting to perform the calculations via a loop within a script, that can be done also. The mechanism for solving the problem you are stuck on at present is to use a global field to carry the value from the previous record, for comparison. So the script runs along the lines of: Loop <perform your calculations here> Set Field ["gTempText", "AccountTitle"] Go to Record/Request/Page [Exit after last, Next] If ["not gTempText = AccountTitle"] Print [no dialog] Clear [ <your summary fields> ] End If End Loop You will need to adjust the sections I've annotated in chevron brackets to insert the appropriate code and command sequences. But first, take a look at summary fields and sub-summary layout parts, to see if they won't do the job for you
Create an account or sign in to comment