what is the calculation? How does it compute a value?
If the calculation computes a result based on the value of other fields, you'd need to set script triggers on each of the fields where modifying the value in that field can change the result of the calculation. (Can't set a trigger on the calculation field.)
If the field computes a value based on Get functions such as Get ( CurrentDate ), then this approach will not work to trigger a script when the value returned by the get function changes.
Thanks for the feedback PhilModJunk. The calculated field I want to set an alert off on is the result of 2 number fields, one simply subtracting the other.
A negative result in the calc field needs to cause the alert. Cheers
So an onobjectSave script or OnObjectValidate trigger would need to be set on both of the "2 number fields" as entering/editing a value in either field could result in the calculation field computing a negative result.
Many thanks. I will later be able to employ your advice. A necessary evil called "work" today will delay my progress. Can't wait to try it. Ta
Brilliant. Spot on assistance and it works perfectly. Cheers
"(Can't set a trigger on the calculation field.)"
So, in your opinion, why the respective command isn't dimmed ?
In other words why they let us to choose a trigger for a calculated field ?
Why questions I can't answer as I am not a programmer working for FileMaker Inc.
But some triggers in a calculation field can be set and tripped. What I should have said was that changes to the value computed in a calculation field won't trip a script trigger on the field as the change is due to the user interacting with a different field--not the calculation field.
I can certainly click in and out of a calculation field, so OnOBjectEnter and OnObjectExit should still work.Other triggers can be set, there's just no way to trip them with a calculation field since you aren't permitted to modify the value in the field directly. And none of these will be tripped when the calculation field recaculates...