Every night we have a script that generates new records in a summary table. Each new record stores summary values in a set of simple number fields--one record for each type of line item purchased. This puts data over a 1,000 records into less than a dozen records. We can then generate summary reports (and chart data) from this summary table much more quickly than from the original line items table.
Thats about what I was thinking. Thanks! Any tips on doing the server side script? All it should be is writing the script and having the server run it at an assigned time right?
i don't see why you would need a server side script for this.
As server side script would allow you to run the script at a scheduled time each night. In our case, we don't use a server schedule as other parts or the same script--that import records from one FileMaker file to another--are not server side compatible. We use an OS scheduled FileMaker robot file instead.
I can provide a basic outline of the script:
Perform a find for all records not marked as "summarized".
Exit Loop if [ Not get ( foundCount ) ]
Constrain the found set to just one group of records that you want to use to compute your summary totals.
Use Set variable steps to copy the values of summary fields.
Use set variable steps to copy the values of any other fields such as a date and/or category name needed to identify the summary record you are
about to create.
Go to Layout based on summary table.
Create a new record
Use set field steps to copy the data from the variables into fields in the new record
Go to Layout [//return to your original layout.
Use Replace Field Contents to mark all of these records as "Summarized".