1 Reply Latest reply on Nov 9, 2014 3:59 PM by philmodjunk

    custom function



      custom function


      hi everyone,

      I'm new to filemaker, looking at different video tutorials I've seen the possibility to create custom functions to simplify and optimize the script of my database. in particular it would be useful (not only to me) to create 4 custom functions to control trigger scripts:
      can anyone help me?

        • 1. Re: custom function

          You cannot actually enable/disable/reset script triggers using features of the database.

          You can use a global variable to enable/disable triggers if you write your scripts to check the value of such a variable and exit immediately if the value set indicates that you want triggers disabled.

          I routinely write trigger performed scripts in this format:

          If [Not $$TriggersOff ]
             Put All other script steps here
          End IF

          So if I need to check and see if triggers are enabled, I check the value of this global variable. And resetting $triggers is done with a single set variable step to modify this variable. I don't really see the need for any custom functions here as the script steps are quite simple and straight forward.