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.