Hi All,

This is a problem that I've been losing sleep over.

I am using FM 8.5 on Mac OSX 10.4.11. Although my client is now using 10.5 with FM 9 - makes no difference.

I have a script that populates fields in a related table by setting fields in a portal.

One table is "Home Delivered Meals Data" in which each record is a client with data about their delivery preferences, etc.

The table I am populating with data from Home Delivered Meals is "DailyTallybyCustomer." In this table, each record is a customer and the number of meals he/she receives on a particular day

The process starts by finding the client records of everyone who received a delivery for a particular day. Then my client runs the script.

This is the script.

Go to Layout [ “Daily Reports and Labels Step 7b: Daily Tally” (Home Delivered Meals Data) ] Sort Records [ Specified Sort Order: Home Delivered Meals Data::record number; ascending ]
[ Restore; No dialog ]
Go to Record/Request/Page
[ First ]
Loop
Go to Portal Row
[ Last ]
Set Field [ DailyTallybyCustomer::Date meal received; Home Delivered Meals Data::Date of delivery ] Set Field [ DailyTallybyCustomer::Delivery day; Home Delivered Meals Data::DayofWeekGlobal ] Set Field [ DailyTallybyCustomer::TotalDinners; Home Delivered Meals Data::TotalDinnersbyCust ] Set Field [ DailyTallybyCustomer::TotalBreakfasts; Home Delivered Meals Data::TotalBfastsbyCust ] Set Field [ DailyTallybyCustomer::TotalBfastDinner; Home Delivered Meals Data::TotalMealsbyCust ]
Go to Record/Request/Page
[ Next; Exit after last ]
End Loop
Go to Layout [ “Daily Reports and Labels Step 1a: Find Customers” (Home Delivered Meals Data) ]
Exit Script [ ]

This script does exactly what I want it to, but we can run it only twice. If we try to run it a third time in a row, Filemaker crashes.

Sometimes my client gets behind in updating the Daily Tally table and needs run the script for each of the days they didn't do it for, so that's why it would be nice to have the ability to run it more than twice. Plus, it just can't be right that it crashes on the third run.

Another interesting tidbit: I created the script in Filemaker 7 and it worked fine. It only starting crashing when we started using FM 8. It continues to crash in 8.5 and 9. When I went back and tried again in Filemaker 7, it works for as many times as I repeat the script.

Whomever can help with this will earn my undying gratitude - even a beer if you're in my neck of the woods.

Thanks!

Terry


Reply via email to