I Cal Import And Export
Exporting iCal Files
You can export any found set of appointments or to-do items to the ical format. You’ll perform this export from the table view of appointments or to-dos (for the rest of this discussion we’ll talk about appointments, but these exporting tips apply to to-dos as well).
For information about how to arrive at table view and how to build a found set of appointments there, see the entry on List and Table view.
Once you have the found set you wish to export, simply click the “export vCal” button at the top of the table view to export the found set as an ical file. This routine will export a file called “seedcodecalendar.ics” which you can then drag to iCal or upload to a web server running PHPiCalendar (see below).
One nice thing about this is that each found set you export from our calendar becomes its own “calendar” in iCal and PHPiCalendar, so you can kind of filter iCal as you filter your FileMaker calendar, providing you export each appointment type as its own found set. If you are frequently exporting several found sets, you may wish to automate this using a plugin (ScriptFire Plugin from http://www.dacons.net or ZippScript from http://homepage.mac.com/jkornhaus/filemaker/plugins.html ) to export the files every x hours.
Changing the Export Format or Content
If you want to change the actual information being exported (if you’ve added some fields to the calendar you’d like to include in your ical file, for instance), you’ll find this pretty easy. If you edit the “Export Appointment Found Set as iCal” script you’ll see one loop in that script; inside the loop is a SetField statement. Edit that SetField and you’ll see we’re using a pretty simple, if somewhat long, calculation to format the iCal record. The “DESCRIPTION” section, right near the beginning of the calc, is likely what you’ll be interested in.
Synching iCal Files (this doesn’t work)
Unfortunately, though we can export and import iCal files, these routines are not designed to synch these files. For one thing most applications (like iCal, or the Palm Calendar) will not preserve any “tracers” we may want to put on a record so that we can get that same record back and do a matching import. We wish that we were able to get such a feature working.
PHPiCalendar is a powerful, free, opensource alternative to iCal. Among its advantages is that you can run PHPiCalendar on most web servers and don’t need a .mac account as you do with iCal. PHPiCalendar reads .ics files just like iCal does, so you can use the iCal export in SeedCode Calendar Pro to create files for PHPiCalendar. Like iCal, PHPiCalendar is a read-only publishing option and, like iCal, it takes each vcal file as its own “calendar” so you can set up filtering in the same way as we described above for Apple’s iCal. You can see a demo PHPiCalendar on our site, or on the main PHPiCalendar site: http://phpicalendar.sourceforge.net/
This is definitely our favorite way to web publish read only calendars. In addition to automating your exports as described above, you can use one of the ftp plugins available for FileMaker 8 to script the delivery of your .ics files to your web server for truly seamless automation.
For more information on calendar web publishing, check out our Calendar Web Publishing Overview: http://www.seedcode.com/cp-app/webpublishing/1
Missing the seedcodeFM2iCal.xsl file?
If you’re seeing this error when exporting iCal files, it is likely that you moved SeedCode Calendar without moving the iCalXML folder that came with it. The seedcodeFM2iCal.xsl file is in that folder. Simply place this file wherever you’d like (you can even place it on your web server and reference it with a url) and then change the reference for it in the “Export Appointment Found Set as iCal” script in SeedCode Calendar. (You change the reference in the “Export Records” step near the end of the script. Click “Specify” next to “Specify Output File” and then click OK to get the XSL Options Settings.
Importing iCal Files
Note. At this time you can only import appointments into the calendar. Unfortunately, you can not import to-dos.
Our iCal import also fails to recognize time zones. So you may need to run replace commands on the imported records to nudge times into your local time zone.
You can find the button to begin iCal imports on the Import section of the Admin tab. Importing these files. Since your iCal source likely doesn’t know about the calendar’s Contacts, Projects, Users, and Types, you can pre fill these values in an imported iCal file by setting the calendar’s filters. If you want the iCal file to come in without any of these attributes, be sure to clear your filters before importing.
After you begin the import you’ll be asked to select your iCal file. The script will have this import set to “Store only a reference” to the file: be sure to leave the setting that way.
Importing these files can take a while, but you’ll see each appointment appear as it is created, letting you know that the import is working. You can stop the import at any time, but you can’t restart from where you left off. You’ll have to begin the import again.
Checking your iCal file before importing it
While our import script checks the first line of the iCal file to make sure you haven’t tried to import something like a Word document, our script can’t really check the file the way a person would. So, to prevent the import script from just spinning away, you should open you iCal files in a text editor before importing them. Check to see that there are no blank lines between events in the iCal file… it should look like one long list of appointment attributes with no blank lines. If you find blank lines there is something wrong with that ical file and we will not be able to import it.
Sources for iCal Files
You can find great files listing national holidays, sporting events, and pretty much anything else you could think of at iCal Share: http://www.icalshare.com/ (Be sure to check these files before importing them.)
Subscribing to FileMaker from iCal
As an alternative to exporting iCal files and uploading them to your server, you may wish to simply make your FileMaker database available as a subscription source for iCal. This is very cool, since users can subscribe to specific parts of the calendar, like “my appointments” or to certain kind of appointments. SeedCode maintains a template and instruction set on enabling this feature here:
Note that this requires FileMaker 8 Server Advanced or FileMaker 9 Server.