2 Replies Latest reply on Jul 15, 2010 1:37 PM by ninja

    calculation triggers script?

    symbister

      Title

      calculation triggers script?

      Post

      Hi again, using FMP 8.5 on mac os

      Is it possible to set up a calculation field to trigger a script if a condition is met?

      thanks in advance

        • 1. Re: calculation triggers script?
          philmodjunk

          You can't do any script triggers natively from filemaker 8.5. You'd need to either upgrade or perhaps you can find a plug in for this.

          Even in filemaker 10 and 11, you could at best write a script that checks the value of the field and responds accordingly when the user exits or saves a field or record.

          • 2. Re: calculation triggers script?
            ninja

            Not sure if you can do that directly, but you could certainly use other action triggers such as committing the record to run a script of the type:

            If (YourTable::YourCalcField = 12345)

                 Perform Script (YourScript)

            EndIf

            That would amount to the same thing (if you trigger this script on commit on each layout based on each table where the components of your calculation reside).  You could go additionally trigger this on layout load and OnModify on the pertinent fields as well if there are still loopholes in the OnCommit trigger.

            Being a simple If, it shouldn't slow you down very much...but of course that depends on the complexity of the calculation in question.  It would be recalculated constantly...

            Ooops.  Missed the "8.5" part.  Sorry.  Thanks Phil!