I use a FileMaker Pro Advanced (FMP) database to keep my client information in my family law practice. I also use OmniFocus (OF) as my task management application. I thought it would be handy to be able to add an action to OF from FMP. I set up fields in FMP for the action’s name, due date and due time. The action is assigned to a client folder in OF based on the client record currently in use in FMP.
The following AppleScript is triggered by the press of a button in FMP:
The following is a description of what the script does:
- The switching of layouts is done to ensure that no field is selected (otherwise an error occurs in the script). In my database, the script is toggled from layout “Layout #2”. the layout is toggled to layout “Client Information” and back to layout “Layout #2”
- The values of four FMP fields are are assigned to variables in the script.
- The date and time of the action are converted from a text format to a time format.
- In OF, the correct client folder is selected. (The script assumes that the folder in OF has already been created).
- In the now selected OF folder a new task is created with the properties: name and due date (which includes the time).
- Back in FMP, the fields for the action name, due date and due time are erased.
- A dialog is displayed to tell me that the script was successful.