Reference > Script triggers reference > OnObjectModify
 

OnObjectModify

Performs a script when the value associated with an object changes as a result of the following:

a user types into an object

a user clicks an object such as a checkbox and causes the value to change

edit operations such as cut, paste, and clear

script steps such as the Insert Text script step that change a field

When the script runs

After the event has been processed.

Modes in which the trigger can be used

Browse and Find modes.

Result

None.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

Partial 

FileMaker Server 

Yes 

FileMaker Cloud products 

Yes 

FileMaker Data API 

Yes 

Custom Web Publishing 

Yes 

Runtime solution 

Yes 

Originated in 

FileMaker Pro 10.0

Notes 

This script trigger activates if used in a panel control when the panels are switched.

This script trigger will not activate a script when the following operations are performed:

those described in Actions that don't activate script triggers

a window is refreshed to update data from an external data source

auto-enter fields are updated

The OnObjectModify script trigger can be set for summary and calculation fields, but it will not activate.

The value of the script parameter that OnObjectModify passes to your script is determined before this script trigger is activated. If you set OnObjectModify to activate on a field object, your script is run after the field is modified. Therefore, if your script needs the value before the field was modified, use the script parameter to pass the field's unmodified value into the script. However, if your script needs the modified value, include a step in the script that gets the field's current (modified) value.

FileMaker WebDirect does not support using the OnObjectModify script trigger to monitor keystrokes in a field (such as when a web user enters text via a keyboard, an input method editor, or a predictive-text suggestion). Monitoring keystrokes with OnObjectModify may reduce performance or lead to unexpected results.

Related topics 

Setting up script triggers

Setting script triggers for layouts

Setting script triggers for objects