04. Push Calendar, Tasks & Notes [9:09]

Description: This video demonstrates FileMaker Pro pushing Calendar, Tasks & Notes to Microsoft Outlook.


Hi, in this video we’re going to take a look at moving data from FileMaker to Outlook in the areas of calendar, tasks, and notes. So you want to start with the beginner demo file. And we recommend that you watch the previous video whereby we go into greater detail on how to add a contact from FileMaker to Outlook. In this video were going to take more of a general overview of moving data to calendar, notes, and tasks. So, will register the plug-in, authenticate with Outlook, and go to the calendar area. You can see here I’ve got some dates; start date, end date, start time, end time. Let’s put in the time – let’s say from 3 to 4 PM.  Then I have a subject and a busy status. The busy status is just an extra field we added for demonstration purposes – it’s not required field. So, let’s insert this event. And you can see here we have a new event in Outlook, in the calendar area. And I’ll add the word “Pro”, and edit that event. You can see “Pro” has been added. And I can view that calendar event right from FileMaker and it will open up Outlook and bring me to the detail view. Likewise, I can delete an event.


1:40 So, under the hood, will look at  “Calendar – Enter Into Outlook”. we perform the script “Plug-in Checker” which verifies that the plug-in is  installed and registered in either “Live Mode” or “Demo Mode”. Then, the authenticate command –  these two scripts are one-time session scripts.  You only need to call those once when FileMaker is opened and from that point on you should be good to go. So, the command to create a new calendar record starts with opening the folder. We’ll call the PCEM_OpenFolder command and we’ll specify which folder to open. In this case, it’s the “calendar” folder –  the general calendar folder in Outlook. And that’s specified with a forward slash and the word calendar (/calendar).


2:32 Then we call the PCEM_NewRecord command. And to call these commands we’re simply setting a variable. That forces the script command to evaluate and perform that action. So after we create a new record, now it’s time to set the data with data from FileMaker. So, we’re calling the function PCEM_SetFieldData. The first part of that function is the field name in Outlook – in this case the field name is “start”.  This particular field requires a time stamp. So, that is a combination of start date, space and start time. So were putting both the start date and the start time in a single line of code here separated by a space. Then we do the exact same thing but for the word “end” or the field “end” you get the end date and the end time, subject and busy status. If you want to see a complete list of fields refer to the fields and functions document.  Then after we set the field data, we save the record. PCEM_SaveRecord. At that point it will return an error or an Outlook ID.


3:57 So editing a record – is essentially the same script steps as adding a record. Instead of calling the “open folder” command, which tells Outlook which folder we want to talk to, we call directly the “open record” command because now we have the Outlook ID and there is no need to open a folder first. We know the exact record and Outlook also knows where that record is – it knows what kind of record it is simply by the Outlook ID that we supply it. So once the record is open, we can begin to immediately set the data in much the same fashion we did when we added a record, and then “save the record”. And that’s how you edit a record.


4:49 To delete a record – it’s done in a single command – PCEM_DeleteRecord and we supply with the Outlook ID. It does have a second parameter which allows for a soft delete or a permanent delete. To read more about that, refer to the documentation.  And then display: to display a record, you first call the open record command which tells Outlook what record were dealing with, you give it the Outlook ID that you received when you first created the record, and you call the PCEM_Display – that will simply pop open the detail view of whatever Outlook record you’re dealing with – in this case “calendar”.


5:36 So calendar works very similar, one could argue that it works identical to contacts except the folders are different and the field names are different. Let’s take a look at pushing notes. I can insert a note from FileMaker to Outlook. Let’s go to the notes area here.  There’s our note and I can edit that note, added the word “Pro” on there, I can view that note, and I can delete that note. Go back to Outlook here you can see the note has been deleted.  A quick look under the hood. Very similar to the other scripts that we’ve looked at; open the folder. Notice that I’m pulling the folder name for Outlook from the field in FileMaker (“gNotes”) folder. I could just as easily do this and hardcode the folder named there. In our demo we put in the folder name ahead of time to make things a little easier.


6:55 Then we call new record command and for notes were simply setting one field called “body” with data from FileMaker, and then we save the record. Editing a note: same thing except we call the “open record”, set the field, save the record. Delete the note: call the PCEM_DeleteRecord command, give it the Outlook ID and the record will be deleted.  Display a record: I first open the record and display it.


7:34 Tasks are identical. Couple of different options you have, you have like an “importance” field.  We don’t show it here on this demo but you can set the reminder in minutes of how many minutes ahead of time you want to be reminded for a particular Outlook task.  So let’s insert a task here. There’s the sample task. Let’s view that task. And let’s edit that task.  There it is edited.  And finally, I’ll delete it.


8:26 Under the hood for tasks. You can imagine as identical to notes and calendar in the way that it works. Open the folder, new record, set the fields, save the record.  Edit the task: open the record, set the fields, save the record.  Delete: simply call the PCEM_DeleteRecord function, supply it with the task ID, it will be deleted. And viewing is identical: open the record, set the Outlook ID, and display the record.

Tags: , , , , ,