Version 5.54 Change List
Posted: Tue Apr 13, 2010 12:49 pm
Overview
Version 5.54 of the calendar makes a couple changes to how the calendar works with multiple FileMaker sources. Here are instructions for making these changes in your copy of the file. If you'd rather get a fresh copy (to copy and paste scripts from) just email support at seedcode.com and as for a copy: please include your license number / order number (the thing that looks like SC3887612091) if you can.
The Fix...
Follow the instructions below to make these changes in your copy of the file...
Color Coding Multiple Sources
This repair fixes a condition where some records could be colored black if one of multiple active FileMaker sources doesn't have colors assigned.
1. Edit the script "Write FileMaker Source to Variable" and find the comment "Find". We've moved the filter script and changed the IF and exit conditions. Edit your script so this section matches the example below:
2. Now edit the script "Apply Filter to Found Set"" and add the four lines in blue above the comment "Loop through filters":
3. Edit the script "Write Each Source as an iCal file" and find the comment beginning "Write the iCal file to a global var, using the variable's repetition..." toward the end of the script. A Set Variable line follows this comment. Add the following 3 lines AFTER the Set Variable line but before the next IF statement so your script now looks like this (new lines in blue):
4. Edit script "Read iCal Event by Number ( Source ; Number )" change the set variable step AFTER the comment "Color / Status" to:
Multi-Day Events & Multiple Sources
These changes address a bug where multi-day events sometimes appear on additional days on the week view.
You'll need to add three lines to the script "Insert into Calendar - Write additional days ( Date )" as shown below.
The calc in the IF statement above reads like this:
Now edit the script "Insert iCal File Into Calendar { UseExistingData }". Find the comment "Use one event count per source and add the line shown below:
Continue in this script and find the comment "Which source's event is earliest?" followed directly by " > > Abstract for sources". That is followed by a set variable step setting $$sc_SourceInUse. Right AFTER that set variable, add another Set Variable line as shown in blue below:
Next, find the last Exit Loop If statement in the script. This is right after another comment that says " > > Abstract for sources". Change that last Exit Loop if calc to read:
That's it!
Version 5.54 of the calendar makes a couple changes to how the calendar works with multiple FileMaker sources. Here are instructions for making these changes in your copy of the file. If you'd rather get a fresh copy (to copy and paste scripts from) just email support at seedcode.com and as for a copy: please include your license number / order number (the thing that looks like SC3887612091) if you can.
The Fix...
Follow the instructions below to make these changes in your copy of the file...
Color Coding Multiple Sources
This repair fixes a condition where some records could be colored black if one of multiple active FileMaker sources doesn't have colors assigned.
1. Edit the script "Write FileMaker Source to Variable" and find the comment "Find". We've moved the filter script and changed the IF and exit conditions. Edit your script so this section matches the example below:
2. Now edit the script "Apply Filter to Found Set"" and add the four lines in blue above the comment "Loop through filters":
3. Edit the script "Write Each Source as an iCal file" and find the comment beginning "Write the iCal file to a global var, using the variable's repetition..." toward the end of the script. A Set Variable line follows this comment. Add the following 3 lines AFTER the Set Variable line but before the next IF statement so your script now looks like this (new lines in blue):
4. Edit script "Read iCal Event by Number ( Source ; Number )" change the set variable step AFTER the comment "Color / Status" to:
- Code: Select all
Let ( [
start = Position ( $sc_Event ; "SC_STATUS" ; 1 ; 1 ) ;
Line = GetValue ( $sc_Event ; ValueCount ( Left ( $sc_Event ; Start + 1 ) ) ) ;
Line = If ( $$sc_ColorCodeBySource = 1 ; $$sc_SourceName[$sc_Source] ; Line )
] ;
Substitute ( Line ; [ "\n" ; "~" ] ; [ "\," ; "," ] ; [ "|" ; "/" ] ; [ "\:" ; ":" ] ; [ "SC_STATUS:" ; "" ] ) // Need to escape returns and pipes in our array
)
Multi-Day Events & Multiple Sources
These changes address a bug where multi-day events sometimes appear on additional days on the week view.
You'll need to add three lines to the script "Insert into Calendar - Write additional days ( Date )" as shown below.
The calc in the IF statement above reads like this:
- Code: Select all
GetAsDate ( CalendarRows::DateRangeStartAutoGlob ) + $$sc_Column - 1 ≥ GetAsDate ( $$sc_DateTimeEnd [ $$sc_SourceInUse ] )
Now edit the script "Insert iCal File Into Calendar { UseExistingData }". Find the comment "Use one event count per source and add the line shown below:
Continue in this script and find the comment "Which source's event is earliest?" followed directly by " > > Abstract for sources". That is followed by a set variable step setting $$sc_SourceInUse. Right AFTER that set variable, add another Set Variable line as shown in blue below:
Next, find the last Exit Loop If statement in the script. This is right after another comment that says " > > Abstract for sources". Change that last Exit Loop if calc to read:
- Code: Select all
$sc_CountEvents + $sc_CountEvents[2] + $sc_CountEvents[3] + $sc_CountEvents[4] + $sc_CountEvents[5] = 0
or
(
$sc_countWritten ≥ $sc_CountEvents
and
$sc_countWritten[2] ≥ $sc_CountEvents[2]
and
$sc_countWritten[3] ≥ $sc_CountEvents[3]
and
$sc_countWritten[4] ≥ $sc_CountEvents[4]
and
$sc_countWritten[5] ≥ $sc_CountEvents[5]
)
That's it!