03. Calendars [4:45]

Description: This video provides an overview of how to push and pull calendars between FileMaker and iCal using the iCal Manipulator.


In this video we will look at exchanging data between FileMaker and iCal.

0:05 Let’s begin with how to pull calendars from iCal into FileMaker. The functions used for this operation are: PCIM_GetItemCountForType which insures that there are calendar records to import; OpenItemAt or OpenItemWithUID which will open each item; PCIM_GetProperty(“calendar”;property) which gets all the desired calendar properties.

0:35 Let’s open the demo and have a look at these functions in our script. This is the demo file that comes shipped with the plug-in. Since I’m using FileMaker Advanced, before we import all our calendars, let’s go ahead and open up Script Debugger and we can step through the script to import all calendars. I’ve added some markers here so you can see where the plug-in function calls actually come into play. As you can see in the demo file we always delete all records, since this is only a demo file and we would like to start fresh each time. Let’s play down to our first function call of GetItemCountForType, and then we will begin our loop and begin opening the items using the Open Item app function. Stepping into the loop we now get the properties: title, notes, type and any other properties you wish to get for calendars. Please see the functions guide for all available properties. Since I have multiple calendars, we’ll continue through this loop till finished. Close debugger, and I now have in FileMaker a list of all of my iCal calendars. To get more detailed information on each calendar simply select this view detail arrow here and I can see that this is my work calendar and these are all the fields that I obtained using the GetProperty function. Note, the fields in yellow are read only. And if we look at each record here are all of my 7 iCal calendars in FileMaker.

2:11 Next let’s look at pushing calendars from FileMaker into iCal. The functions used for this operation are: NewItem – which creates the new item type, in this case the type is going to be set to calendar; SetProperty – which sets the desired property values; and SaveItem which saves the item. Let’s go back to our demo file and see these functions in action. Let’s create a new calendar in FileMaker. Here I will title it Test Calendar 1, have my color specified, and some generic notes. Let’s open up debugger, move that over a little bit so you can see our button selection, and we will select the Add/Update iCal button. And I have my marker set so I’m actually going to play through to the first plug-in function call. This script in our demo file allows you to update a single record or the found set of records. In this case I’m just going to select single and update the single record so I can add my new calendar record into iCal. The first plug-in function to make this happen is PCIM_NewItem with the type set to calendar. Next we will begin to set all the properties such as titles, notes, color and then we will save the calendar to iCal using the SaveItem function. After we’ve saved the item to iCal it’s a good idea to get the properties such as the UID, type and even isEditable status. We’ll just play through here, close debugger and as you can see my new calendar in FileMaker has now been pushed to iCal. I have a UID # here which is captured from iCal, as well as the type and isEditable status. Let’s open up iCal and I can now see that I have my Test Calendar 1 here in iCal ready for use. Adding a calendar to iCal is really that simple.

4:20 I encourage you to utilize additional resources such as exploring this website, review the additional videos and documentation and download a demo file. If you have any additional questions please feel free to contact us via email, phone or browse our forum. We look forward to hearing from you and hope you enjoy connecting FileMaker and iCal.