Mod: Improved iCal Export

Support, Questions and Suggestions for the FM7 Version of CC Calendar.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Aug 04, 2004 10:59 am
Applicable Versions

CC Calendar Pro running under FileMaker 7.


Introduction

With the 5.31 version of CC Calendar Pro for FileMaker 7 we've improved the iCal export so that events with just start times now look more normal in Apple's iCal. This change also greatly simplifies the calculations used to format the export, making it easier to maintain down the road.

Instructions for making this modification in your copy follow.

Licensed users of CC Calendar Pro for FileMaker 7 may email [email protected] to request a copy of 5.31 containing these enhancements.


The Modifications

In CCCalendar.fp7 you'll edit the Export Found Set as iCal script. Within this script there is one loop and within that loop one SetField command. The field being set here is fine; you'll be changing the calculation we setting into the field.

This calculation is broken up with comments in the form
Code: Select all
// DateTime Start


You'll want to replace everything between // DateTime Start and // Begin Duration with the following. (Note that this replaces the DateTime Start section and the DateTimeEnd section, but not the duration section).

Code: Select all
// DateTime Start

If(IsEmpty(AppointmentsDaily::ApptTimeStart);"?DTSTART;VALUE=DATE:"; "?DTSTART;VALUE=DATE-TIME:") &
Year(AppointmentsDaily::ApptDateStart) & Right("00" & Month(AppointmentsDaily::ApptDateStart); 2) & Right("00" & Day(AppointmentsDaily::ApptDateStart); 2) & If(IsEmpty(AppointmentsDaily::ApptTimeStart); ""; "T" & Right("00" & Hour(AppointmentsDaily::ApptTimeStart); 2) & Right("00" & Minute(AppointmentsDaily::ApptTimeStart); 2) & Right("00" & Seconds(AppointmentsDaily::ApptTimeStart); 2) & "") &

// Begin DateTime End

Let ([
n= If(IsEmpty(AppointmentsDaily::ApptTimeStart);1;0)
];
If(IsEmpty(AppointmentsDaily::ApptTimeStart);"?DTEND;VALUE=DATE:"; "?DTEND;VALUE=DATE-TIME:") &
Year(AppointmentsDaily::ApptDateEndCalc + n) & Right("00" & Month(AppointmentsDaily::ApptDateEndCalc + n); 2) & Right("00" & Day(AppointmentsDaily::ApptDateEndCalc + n); 2) & If(IsEmpty(AppointmentsDaily::ApptTimeStart); ""; "T" & Right("00" & Hour(AppointmentsDaily::ApptTimeEndCalc); 2) & Right("00" & Minute(AppointmentsDaily::ApptTimeEndCalc); 2) & Right("00" & Seconds(AppointmentsDaily::ApptTimeEndCalc); 2) & "")
)//Let
 &

// Begin Duration


Note: ? is the paragraph symbol in FileMaker.

That's It!
John Sindelar
SeedCode

Return to CC Calendar (FM7/8)

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: