FileMaker Pro v10 Script Triggers and Pop-up Menus/Drop-down Lists

FileMaker Pro v10 has been out for over 9 months now and in that time developers have come up with a range of new and innovative techniques in the application of Script Triggers to real world problems. One of my favourite uses is to combine a Script Trigger with a field formatted to use a Pop-up Menu or Drop-down list and compare the “before” and “after” value and apply business rules where appropriate. Using a Script Trigger you can capture the “before” value if you pass this as a Script Parameter to the calling script. You can then compare that the new new changed value that you have selected from the menu/list. Due to the timing of the OnObjectModify script trigger a user can change a field using the menu/list – for example changing a Membership Type from “Bronze” to “Silver” – and the script trigger can capture the original value before it is committed from the passed parameter and compare that against the new value stored in the field.

I’ve created a simple sample file that demonstrates this technique that you can download here.

FileMaker Pro 10 – Script Triggers

I’m in the process of updating one of my main solutions that previously used script triggering via the zippScript plugin under FM9 with FM10 native script triggers. zippScript worked really well and was a great all round script triggering plugin but one thing it couldn’t handle was keystroke based script triggers which are native in FM10. For many years I’ve yearned for a way to update a field that counts both the number of characters entered and the number of allowable characters remaining (this is for an SMS solution that has a max of 160 characters in the message field). With FM10 this is now a snap and combined with conditional formatting you can do some nice interface tricks (e.g. make the count field red when it exceeds a limit) and show a dialog when you hit 160 characters etc. I’ve put together a simple demo file for anyone that’s interested at:

http://www.databuzz.com.au/downloads/DB_SMS_Count.zip

I’ll hopefully have some more demo files online shortly.

Do you Twitter?

We’ve been reading a lot about Twitter lately and have now joined the Twitter community. You can see us on Twitter at http://twitter.com/databuzz or just click the Twitter logo below.

If we see that you’ve started following us we’ll endeavour to follow you also.

Databuzz eNews – December 2008 Released

We’ve just released our eNews newsletter for December 2008. You can view it online at:

http://www.databuzz.com.au/enews/enews_122008_generic.html

If you want to be added to the newsletter mailing list just leave a comment below and we’ll add you to the list until our new automated subscription service is operational.

fmSMS . . . Coming Soon

fmsms-logo-s

We’ve been hard at work finalising a new product of ours – fmSMS – which is the combination of over 7 years of experience integrating FileMaker Pro with SMS (Short Message Service/TXT) gateways to allow you to send single/bulk SMS messages at the click of a button from a FileMaker Pro database. I can still remember the excitement when I sent my first SMS message from a FileMaker Pro v5 database to my mobile phone and seeing it arrive within seconds. That same “wow factor” is also seen by all of our clients when they first implement SMS with their FileMaker solutions and see how easy it is to sent short messages to their customers.

We’ve decided to start from scratch and combine all the great features of FileMaker Pro 9 with the power of SMS communication. With fmSMS you will be able to:

  • send an SMS message to a single Contact which is typically received in under 10 seconds
  • send a bulk SMS to a group of Contacts using templates and merge fields so each message is personalised
  • check on the delivery status of each message that you have sent
  • schedule a message to be sent up to 7 days in advance (for example you could send an SMS today and have it delivered on the weekend or holidays. Make it look like you’re in the office on XMas!)
  • check your available SMS credits
  • purchase additional SMS credits

There’s a stack of other great features that we’re finalising now. You will be able to access over 700 mobile networks in over 200 countries with SMS prices around AUD 6-8 cents each.

We’d love to hear about any must have features that you’d like to see in fmSMS in case we’ve missed anything – just leave us a comment below. If you’d like to be added to the notification list when we release fmSMS just leave a comment with your name and email address and we’ll take care of the rest.

UPDATE: fmSMS has now been released and you can get all the details at www.fmsms.com. A trial version is available to download.

We’re FileMaker 9 Certified!

Andrew Duncan finally found time to sit for the FileMaker 9 Certification exam today and we’re pleased to announce that he passed with flying colours. We aim to maintain our certification with each new version of FileMaker that is released. FileMaker Certification lets our customers know that we’re experts in the FileMaker industry and is the only credential sponsored by FileMaker Inc.

 

FileMaker 9 Certified!

Latest Databuzz Newsletter Now Online

We’ve just released our latest eNews for October 2008. You can read it online at:

http://www.databuzz.com.au/enews/enews_102008_generic.html

Unable to see hosted files on FileMaker Server

An issue has arisen with installations of FileMaker Pro and FileMaker Server on or after Sept. 22, 2008 using SSL that causes hosted database files to be invisible to workstation computers. If you have installed FileMaker Pro on or after Sept. 22, 2008 and have FileMaker Server set to use SSL you will experience this. FileMaker now have an article in their KnowledgeBase about this with a suggested workaround. There’s also been some discussion about this on fmforums with some other suggestions that you might find more practical, including simply replacing the server.pem file with a known good copy from another workstation in your office that was installed prior to Sept. 22, 2008 or turning off SSL.

Update (October 19, 2003): FileMaker have released a number of “SSL Updaters” that will install a valid SSL certificate file (server.pem). Updaters are available at the FileMaker downloads site. At the time of writing there are the following updates:

 

Not sure if a FileMaker Server 9 update for Windows is necessary at this stage.

FileMaker API for PHP

It’s been over 2 years now since the FileMaker API for PHP public beta was first released, followed by it’s inclusion in FileMaker Server 9 (not Advanced which was a great decision to really get the technology widely adopted). I’ve done a lot of projects this year involving the FileMaker API for PHP to create web interfaces to backend FileMaker 9 databases, as well as upgrading some old .fp5/CDML sites to PHP API. Upgrading an old CDML site is great as you can accomplish so much more with PHP compared to the old proprietary CDML, and more often than not there is a great code snippet that you can reuse on the php.net site or other third party sites. I’ve been able to convert a 20+ page CDML site down to less than 10 pages with PHP, mainly through the use of include pages and variables.

FileMaker Server 9 ships with the PHP Site Assistant, which for anyone who worked with CDML and used the FileMaker Connection Assistant that was part of Claris Home Page, will see as it’s logical successor for the PHP API. It does a good job in creating a site in a matter of minutes (you can choose what type of site you require) and creates the necessary php pages and uses some nice looking CSS. However the more you use php pages generated by the Site Assistant the more problems you are likely to encounter in my experience. The php pages created by the Site Assistant are multi-purposed and have code for a number of requirements that you might not require (e.g. a record details page can be used to view, edit, delete or find). It also makes use of an include file – fmview.php – which is where things get really confusing. This php page has lots of php code to handle lots of different tasks and as you start to extend and customise the pages generated by the Site Assistant you are likely to butt heads with the fmview.php page as you try to understand what it’s trying to do.

Like me you’ll probably find extending pages generated by the Site Assistant problematic if you don’t want to rely on the fmview.php file, which is required for other functions. You quickly get to the point where you need to rewrite the pages from scratch so they don’t rely on the fmview.php page and you can have total control over each page and how it interacts with your FileMaker database. There’s also a few bugs with the php generated by the Site Assistant that you’ll have to deal with (e.g. in the recordlist.php page it creates navigation links for moving from one page to another in your found set of records, but the links overlap. For example it will have Record 1-20 on page 1, then Record 20-40 on page 2, and so on but it should be Record 1-20, Record 21-40 etc.)

Another alternative to generating PHP API pages quickly is FM Studio from fmwebschool. Like the Site Assistant it will generate the necessary PHP code for the PHP API and create your browse, find, edit, delete etc code for you. Like the Site Assistant you will also probably spend some time understanding how and why FM Studio does certain things and getting your head around the include files that are required.

Once your become familiar with the PHP code required you can hopefully get to the point where you can simply write the code yourself into your php editor (I use Dreamweaver). You’ll generally end up with cleaner and more concise code that you understand and can make sense of (don’t forget those comments!) without wondering why someone else did it that way.

Getting started with PHP does takes some time, like learning anything new. Here’s a list of some of the resources that I found useful in getting started with PHP in general and the new PHP API:

six.fried.rice blog article “Up to Speed with the FileMaker PHP API”

FileMaker Inc PHP Web Publishing Overview

Article in PHP Architect Magazine by Jonathan Stark – Part 1

Article in PHP Architect Magazine by Jonathan Stark – Part 2

FileMaker Custom Web Publishing with PHP PDF

VTC Training CD – FileMaker 9 PHP Foundations

jonathanstark.com – Jonathan Stark is the author of the Web Publishing with PHP and FileMaker 9 book

As well as Jonathan Stark’s book there is also another book I found useful that extends the content of Jonathan’s book – FileMaker Web Publishing: A Complete Guide to Using the API for PHP
By Allyson Olm, Stephen Knight, Michael Petrov. Both books come with sample code that you can open in your editor of choice and get hands on as you work your way through the chapters.

Note: as well as FileMaker’s official API for PHP there are some other alternative PHP API’s. Firstly there is FX.PHP which was around for many years before FileMaker’s PHP API was released. There’s also FM and PHP which I haven’t looked at yet.

FileMaker Mobile for the iPhone

I didn’t mention this in my DevCon 2008 recap but one of the other new tools that was previewed in the foyer and hallways of DevCon was the new FMTouch. Think of FMTouch as FileMaker Mobile for the Apple iPhone or iTouch, but much better. The relational capabilities of FMTouch is something long time FileMaker Mobile (now discontinued) users have been wanting for years. FMTouch, whilst limited to the Apple iPhone and iTouch, does a great job in transferring data between your iPhone and your copy of FileMaker on your desktop computer. Like FileMaker Mobile the data is not live but synced on demand – the iPhone just needs to be on your local network using the built in WiFi or you can setup port forwarding to sync remotely.

It works via a plugin and does require the use of FileMaker Pro Advanced to create the Database Design Report that gets downloaded to the iPhone to create the database structure on the iPhone. Databuzz can help you if you don’t have a copy of FileMaker Pro Advanced but need to create the DDR to get FMTouch up and running.

Databuzz is working on some web based solutions for handheld users that need live access to their data, using the FileMaker API for PHP and FileMaker Server 9. We can create smaller versions of the main layouts with navigation between them and on a 3G connection the performance is generally more than adequate. This will work on all handheld web browsers and provides live access to your FileMaker database, which is becoming more and more of a necessity for many of our customers when on the road with only their mobile/smartphones.