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:

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