Many times, you may want to have a script run after hours to help clean up or compile information in your solution. Generally, users have FileMaker running on a machine using a schedule to run these scripts. Long time FileMaker developers refer to these client machines as FileMaker robots. They are not actually robots but about as close as most FileMaker developers will ever get to creating one.
In a blog posting from my FileMaker Thought Bucket blog called FileMaker Dev Conference 2007 - Day One, I mentioned a session I attended called ABOUT MAXIMIZING PERFORMANCE VIA LATE NIGHT AUTOMATION - By Richard Carlton of Richard Carlton Consulting. A new feature in FileMaker 9 is the ability to run FileMaker scripts from a scheduled event. Many developers became excited that they could retire their FileMaker robots but it appears that may not be the case. There is a few aspects of the new FileMaker Server feature that you need to be aware of but I wouldn’t get too upset about it.
One of the aspects that might put a crimp into your server scripting plans is that the scripts to be run from the server consist of web-compatible steps ONLY. Those of us with experience developing FileMaker Instant Web Publishing solutions realize quite quickly what script steps won’t be compatible and how to develop with those limitations in mind. In short, the use of one little check box can make the entire difference.
Here you can see the check box in the Edit Script dialog box. The clicking of this will gray out incompatible script steps. You can see these grayed out steps in both the script step pick list to the left and the script steps included within the current script. The two most glaring omissions are the the Import Record and Export Record script steps. These two script steps are very common in maintenance related scripts that run after traditional business hours.
In some cases, I’ve heard of plug-ins or other third party products that are available or planned to help with this feature. However, I don’t have any experience with them and I’m just a little bit skeptical (at this moment in time).
Another thing to consider is the use of the Set Error Capture script step because of the way it will affect the scripts execution. I believe that is Set Error Capture is OFF, the script will stop when it hits a NON-IWP compliant script step. If Set Error Capture is ON, the script will skip the non-IWP compliant script step and continue executing on the next script step. However, I don’t think you really want either option because it can adversely affect the integrity of your solutions data.
You can use the Get(ApplicationVersion) to detect if the script is executing from the server and branch around the non web compatible script steps and towards the compatible ones.
Additionally, FileMaker 10 Server now supports some scripted data import / export actions and the ability to generate emails on a scheduled basis from the Server containing FileMaker generated data.
More info about the author and FileMaker in general, contact me at email@example.com.
© 2009 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.
MacUSA provides website and FileMaker Pro hosting services. Utilizing the highest performance web and FileMaker servers. We make FileMaker database hosting as simple as possible. Mac USA Technical Support has been voted the best by our customers. FileMaker Server hosting for your FileMaker web hosting needs supporting FileMaker 10 down through version 5. Hosting FileMaker Pro databases for Instant Web Publishing and Custom Web Publishing including PHP, XML, ODBC, and MySQL access. Use Promo Code dw0904TB for FREE setup (a $25 value) when signing up for your FileMaker Hosting services. Offer expires 6/30/2009. http://macusa.net