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

    OnWindowClose script trigger - PRE or POST?

    mattduke101@gmail.com

      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."

      http://www.filemaker.com/12help/en/html/script_trigg.38.21.html#1034721


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

      http://help.filemaker.com/app/answers/detail/a_id/7465/kw/script%20trigger%20tab/session/L3RpbWUvMTM4OTg4NTMwOC9zaWQvM2szd1V3S2w%3D

      (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

      or

      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!

       

      -Matt-

        1 2 Previous Next