Version 5.54 Change List

Support for our integrated Contact Manager, Calendar, and Project Tracker.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: 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:

Image

2. Now edit the script "Apply Filter to Found Set"" and add the four lines in blue above the comment "Loop through filters":

Image

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):

Image

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.

Image

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:

Image

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:

Image

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!
Last edited by John Sindelar on Tue May 18, 2010 11:55 am, edited 3 times in total.
John Sindelar
SeedCode
Posts: 4
Joined: Sun Mar 07, 2010 9:35 am
Location: Belgium
PostPosted: Wed May 05, 2010 1:19 pm
Hi John,

Weird... Since I changed the 5.54 in my app, I get into an infinite loop in the last Exit Loop if calc

What can be wrong?

Ludwig
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed May 05, 2010 2:03 pm
Are you sure that both edits (the exit loop edit and the one above that) both spell the variable the same way: $sc_countWritten
John Sindelar
SeedCode
Posts: 4
Joined: Sun Mar 07, 2010 9:35 am
Location: Belgium
PostPosted: Thu May 06, 2010 2:21 am
Yes, actually they do match.

What surprises me is that, although I have only 2 sources, he consistently returns "$sc_SourceInUse" = 3 ?! which has an impact on the set variable line.


Ludwig
Posts: 4
Joined: Sun Mar 07, 2010 9:35 am
Location: Belgium
PostPosted: Thu May 06, 2010 4:39 am
John,

I've put the previous script "Insert Ical File into calendar" back in there and now it works fine...

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: