AnsweredAssumed Answered

get(activefieldcontents) produces inconsistent result

Question asked by JonJ on Jun 30, 2015
Latest reply on May 10, 2016 by TSGal


get(activefieldcontents) produces inconsistent result


FileMaker Pro


14 (and 12 and 13)

Operating system version

OSX Yosemite and Win8

Description of the issue

the documentation for get(activefieldcontents) says that it "Returns the contents of the field that has the focus."

When you set up a script trigger for a field, onObjectModify, using get(activefieldcontents) as a script parameter, the value delivered is the *unmodifed* value, even though the script trigger is supposed to fire *after* the object is modified.

If the target script includes get(activefieldcontents), with no intervening records commits or reverts, the value delivered is the *modifed* value.

This is inconsistent, as there should not have been any changes in record state between the script trigger firing and the script starting. It is clear from the documentation, that the script parameter should be delivering the *modified* (but so-far unsaved and uncommitted value), not the *unmodified* value.

FileMaker has been doing this since v12, and I've usually had a workaround, but in a current solution, I need the function to work as expected.

Steps to reproduce the problem

Set up a field with a script trigger as above, with  get(activefieldcontents) as a script parameter, and targeting a script which also sets a variable using get(activefieldcontents)

Expected result

The results of both instances of get(activefieldcontents) should deliver the same result, namely the current, unsaved contents of the modified field.

Actual result

The two instances of get(activefieldcontents) deliver different results; the script parameter delivers the field's original (unmodified) value.

Exact text of any error message(s) that appear


Configuration information

Same on PC or Mac, any FM version from 12-14.


usually I opt to use one or the other, with an understanding of the inconsistency. In my current project this isn't possible.