1 Reply Latest reply on Apr 22, 2015 11:09 AM by philmodjunk

    Script trigger on entering table view



      Script trigger on entering table view


      I'd like to set up a script trigger to run when I enter table view in a given layout. I see that there's an option to run a script any time a user switches between views, but I don't see a way to specify that I only want it to happen with one specific view.

      If it's helpful, what I'm trying to do is have the window automatically resize when a user switches to table view (I already have a script trigger set up to default to form view and an appropriate window size on layout enter).

        • 1. Re: Script trigger on entering table view

          Use the OnViewChange trigger to run this script:

          If [ Get ( LayoutViewState ) = 2 // layout is now in table view ]
             Do your window size change here
          End IF

          The script will be performed any time the view changes, but doesn't actually do anything unless the view changes to table view.

          PS, if you find yourself asking "is there some way to get some info about the current state of my File/layout/record? Open up FileMaker Help and check over the Get functions. There's a decent chance that one of the options for this swiss army knife type of function will do what you need.