Blog
Home / Blog / FileMaker / FileMaker 14 Script Triggers
12May 2015

FileMaker 14 Script Triggers

About the Author

Mislav Kos Mislav Kos

Mislav is a FileMaker developer and a Senior Technical Project Lead at Soliant Consulting.

Comments (11)

Scott Macdonald - May 14, 2015

Hi, Mislav:

This is great share to the entire FM community, and in a wonderfully-illustrative format! Having just read through this for the first time, I two things come to mind immediately: there is a duplication of “OnObjectSave” in the FMll diagram, and the “OnObjectEnter” doesn’t really work with Popup Menus when you want to “grab” the existing value before it changes it to another from the popup menu choices made by the user.

I suspect that you have encountered the latter in your development and may use a similar “faux” display field that subsequently triggers the desired behavior in the actual popup menu, but would love to know what that is.

Thanks for the contribution, Mislav.

– – Scott Macdonald

Reply
Mislav Kos
Mislav Kos - May 21, 2015

Hi Scott, 

Thanks for your comment and feedback. We've corrected the FM11 graphic. As for the OnObjectEnter trigger, you're right – when you click on a popup field, that trigger doesn't fire until after you click on one of the values in the popup. You mention one technique of capturing the value before it's changed. Another could be to use the OnRecordLoad trigger to store the values of all popup fields on a layout in a global variable.

Reply
Howard Callender - May 31, 2015

Thank you for sharing! Keep up the great work!

Reply
Sal - September 2, 2015

Thanks for these insights and materials

Reply
Dan Wheelon - September 2, 2015

Mislav and Scott,

Just following up on your discussion about capturing the previous value of a popup menu field. It can be done using the OnObjectModify script trigger, but with a silly work-around. With “Get ( ActiveFieldContents )” set as the script parameter, you can, oddly enough, store previous and current values like so:

$previousValue = Get ( ScriptParameter )
$currentValue = Get ( ActiveFieldContents )

I have no idea why Get ( ActiveFieldContents ) returns different results when used as the script parameter vs in a script step. I wish I did!

Thanks for the article, Mislav.

Dan Wheelon

Reply
Mislav Kos
Mislav Kos - September 2, 2015

Dan,

Great tip. Thanks for letting us know.

Reply
Binu Alexander - October 2, 2015

I have filled the form to download the demo twice ….. still haven’t recieved it …

Reply
    Daniella Andrade
    Daniella Andrade - October 2, 2015

    Hi Binu,

    Could you please go ahead and submit the form again? If you don’t receive it please e-mail me at dandrade@soliantconsulting.com.

    Thanks!

Mike Easter - October 12, 2015

Thanks Mislav
A very informative blog it has help pull together all the triggers in a cohesive way

Reply
Kristy - October 15, 2015

Nice breakdown, thanks!

Reply

Leave a Reply