I can set a field to Auto Enter Dates, names, and account whenever the record is modified.
I can set a field to Auto Enter a calculated result upon it's creation.
But can I set a field to AutoEnter a calculated result upon it's modification?
It looks like the perfect case for a Script Trigger
I should also point the following function: Get(RecordModificationCount)https://fmhelp.filemaker.com/help/16/fmp/en/index.html#page/FMP_Help/get-recordmodificationcount.html
You'd have auto-enter Date etc. then use it as depending field like
Left ( someAutoenter ; 0 ) & <<the calculation>>
Evaluate ( "<<the quoted calculation>>" ; someAutoenter )
A useful trick for this kind of scenario is to have a number field that gets set to 1 by script—I call this field trigger. Then for any auto-enter by script field you want to re-evaluate like this, you can add a reference to the trigger, thus:
If ( trigger = 1 ; "<your auto-enter calc> ; self )
This way, you can cause this field to re-evaluate simply by resetting the trigger field. This method enable you to do this simple reset and have a whole bunch of such fields update.
Getting the modified count is good. I often use Case().
I use Case ( ModifyTimeStamp; calc goes here )
I use case is :
Case ( ModifyTimeStamp; Get(CurrentTimeUTCMilliseconds) )
For getting a UTCms timestamp on record modification. Sadly FM does not offer this as one of the OnModify Timestamp options.
Retrieving data ...