2 Replies Latest reply on Oct 15, 2012 5:02 PM by StevenKienle

    Scripts Not Executing in Preview Mode

    StevenKienle

      Summary

      Scripts Not Executing in Preview Mode

      Product

      FileMaker Pro

      Version

      12

      Operating system version

      Mac OS X Lion

      Description of the issue

      I have a layout set up that using both the OnLayoutEnter and OnLayoutExit script triggers.  The first to set the necessary find criteria for the report then to enter Preview mode.  The second to reenter Browse mode.  But when in Preview mode, neither of these scripts appear to be triggered, even through the OnLayoutExit documentation specifically states "Modes in which the trigger can be used: Browse, Find, and Preview modes."

      Am I misreading the documentation and as long as I am in preview mode the scripts are not executed, is this a bug or is there some option I need to set which I haven't?

      Thanks,
           Steve

      Steps to reproduce the problem

      Create a script with a Pause Script step
      Set it to the OnLayoutEnter or OnLayoutExit mode
      Switch to another layout and enter Preview Mode
      Switch to this layout

      Expected result

      The script should be executed

      Actual result

      The script does not execute

      Exact text of any error message(s) that appear

      No error message appears, the script simple does not execute.

      Workaround

      Other that having the user manual exit preview before switching layouts, none

        • 1. Re: Scripts Not Executing in Preview Mode

               Steven Kienle:

               Thank you for the post.

               To attempt to replicate this I created a new database with two related tables, A and B, and two layouts, A and B. I used the "OnLayoutExit" script trigger enabled in Preview mode only on layout B to perform the following script:

               Set Variable [$test; Value:B::B]
               Show Custom Dialog ["WORKS";$test]
                
               I created a single record in table A and a single record in table B. The record in Table B read "This Works." I entered preview mode while viewing layout B, then switched to layout A and my custom dialogue box displays "This Works."
                
               The behavior was unchanged with an "Enter Preview Mode" script step at the beginning set to "Pause."
                
               Am I possibly missing a step to replicate?
                
               TSFalcon
               FileMaker, Inc.
          • 2. Re: Scripts Not Executing in Preview Mode
            StevenKienle

                 OK, I feel like a fool now.  I didn't have the script enabled in Preview mode...

                 Thanks,

                     Steve