We've identified a problem in the creation of repeating events where, if you create appointments that repeat weekly, your initial appointment will be duplicated in some cases. When this occurs you'll see two appointments for your initial date, followed by the remainder of the repeating events created correctly.
This only applies to the Pro and Pro Dev Versions of CC Calendar for FileMaker Pro 7 prior to version 5.33.
Reproduce the Bug
Navigate to Wednesday August 6th, 2003 on the daily view of the calendar. Create a new appointment and select it to repeat weekly, on Wednesday, for 3 repetitions. After clicking "Save Repeat Settings" and "Continue", you'll see August 6th twice in your list of newly created appointments.
Fix The Bug
This bug can be fixed by entering two new lines into the "Create Repetitions" script in CCCalendar.fp7
This script contains the comment "Create Record" in two places. Once, about 2/3 of the way through the script, and again towards the very end of the script. We'll be editing the script lines following the first of these "Create Record" comments. Here is the section of the script you'll be changing. (The following shows the script in its unaltered form).
- Code: Select all
#Create Record
Duplicate Record/Request
Set Field [ AppointmentsDaily::ApptEndDate; If ( not IsEmpty ( AppointmentsDaily::ApptEndDate ); CalendarDaily:: CalRepeatDateGlob + ( AppointmentsDaily::ApptEndDate - AppointmentsDaily::ApptDateStart ) ; GetAsDate ( "" ) ) ]
Set Field [ AppointmentsDaily::ApptDateStart; CalendarDaily::CalRepeatDateGlob ]
#
Set Field [ CalendarDaily::GlobNum1; CalendarDaily::GlobNum1 + 1 ]
Set Field [ CalendarDaily::CalRepeatStopOnNumberGlob; CalendarDaily::CalRepeatStopOnNumberGlob - 1 ]
Exit Loop If [ CalendarDaily::GlobNum1 > ValueCount ( CalendarDaily::GlobText1 ) ]
We'll be changing this to introduce an IF statement right after the "Create Record" comment. We'll then add an "End If" line right before the "Exit Loop If" line. The modified section of the script would look like this:
- Code: Select all
#Create Record
If [ CalendarDaily::CalRepeatDateGlob <> AppointmentsDaily::ApptDateStart ]
Duplicate Record/Request
Set Field [ AppointmentsDaily::ApptEndDate; If ( not IsEmpty ( AppointmentsDaily::ApptEndDate ); CalendarDaily:: CalRepeatDateGlob + ( AppointmentsDaily::ApptEndDate - AppointmentsDaily::ApptDateStart ) ; GetAsDate ( "" ) ) ]
Set Field [ AppointmentsDaily::ApptDateStart; CalendarDaily::CalRepeatDateGlob ]
#
Set Field [ CalendarDaily::GlobNum1; CalendarDaily::GlobNum1 + 1 ]
Set Field [ CalendarDaily::CalRepeatStopOnNumberGlob; CalendarDaily::CalRepeatStopOnNumberGlob - 1 ]
End If
Exit Loop If [ CalendarDaily::GlobNum1 > ValueCount ( CalendarDaily::GlobText1 ) ]
That's It!