Database Reference
In-Depth Information
NOTE
The
OnObjectModify
trigger doesn't fire if you modify the field without entering it. For instance, if
a script runs the Set Field script step, then the field changes but the trigger doesn't fire. Nor does it
fire when calculation, Auto-Enter or summary fields are updated. Dragging text into a field
does
fire
the
OnObjectModify
trigger. Take care with this trigger if you have a mix of versions, though.
FileMaker Pro 10 doesn't run the
OnObjectModify
script trigger when data is dragged in its fields.
OnObjectValidate
This trigger can be applied to any object but is only triggered for fields that have field Valid-
ation options (
Looked-Up Value
)
. The trigger fires
before
the data in the field changes and so
isn't triggered just by clicking or tabbing into the field. Because it fires before its action,
OnObjectValidate
can be canceled. It's available in Browse and Find modes.
Not all changes to data in validated fields will cause the trigger to fire, however. Spell Check
and Find/Replace don't fire
OnObjectValidate
. Whether you run them manually or by
script, Import, Replace Field Contents, and Relookup Field Contents also don't fire this trig-
ger.
OnObjectSave
While
OnObjectModify
fires as you modify a field,
OnObjectSave
fires after the field's data
has been validated and saved, but before the field is exited. With this trigger, you can modify
the field repeatedly without interruption. Then, when you're done and you leave the field by
tabbing, pressing Enter, clicking in another field, or by any other means, the trigger fires.
This trigger fires only if you actually make a change. If you click in a field and then leave the
field without making changes, nothing is saved and the trigger doesn't run. And because it
fires before its action,
OnObjectSave
can be canceled. If your script returns False in an
Exit
Script
step, then it forces the user back into the field. It's available in Browse and Find
modes but can be attached only to fields.
OnObjectExit
The
OnObjectExit
trigger is exactly the opposite of
OnObjectEnter
. It fires before you
leave an object. For fields, this means tabbing away, committing the record, and so forth. For
buttons and tab controls, “exit” means tabbing away. For portals, the trigger fires when you
leave a portal row by using any method. Finally, for web viewers, it fires before you click
away from an active web viewer. Any script step that causes an object to be exited will fire
the trigger.