1 2 Previous Next 17 Replies Latest reply on Jan 17, 2014 4:03 AM by wimdecorte

    OnWindowClose script trigger - PRE or POST?


      Hello there -


      This is my first question on this forum and I'm an FM Newbie, so please go easy on me if I'm asking a stupid question!


      It concerns the ONWINDOWCLOSE script trigger -

      A) the Soliant book I'm learning from thinks it's a POST event trigger

      B) this FileMaker 12 help page I ASSUME thinks it's a POST trigger as it states:

      "OnWindowClose activates AFTER FileMaker Pro exits a mode."


      C) BUT the table on this Filemaker Support page lists it as a PRE trigger -


      (It's 19th in the list 0f 20)

      Now then, I thought I could see for myself which type is by testing whether or not I could cancel the script using the Exit [Result: False] step, because as far as I can make out, you only use this mechanism successfully with PRE triggers.


      So I ran this simple script attached to the OnWindowClose trigger when the found set was 5 ...


      If [ Get (FoundCount) ≥ 1 ]

      Exit Script [Result: False ]

      End If

      ... and lo and behold the window did not close, which led me to believe that it's a PRE trigger as the Exit step obviously worked. Having said this, the FM documentation in point B above does say that you CAN use the Exit Script step with this trigger, even though the same article lists it as a POST trigger.

      So, I have 2 questions ...

      1) Is OnWindowClose PRE or POST?

      2) Have I got it completely wrong about only being able to use Exit [Result; false] to cancel the script if the trigger is PRE event


      Am I right about this but the only exception to the rule is this particular trigger?

      I'd greatly appreciate if soneone could clear this one up for me!



        1 2 Previous Next