pmccudden

Best Practices for Go To Layout

Discussion created by pmccudden on Apr 19, 2018
Latest reply on Apr 20, 2018 by pmccudden

Hello! I've recently been thinking of what would be the best way to go to a layout. I've looked at several different posts and it seems that people either prefer to go to a layout based on a layout ID or name. The reason why I want to use a script is I typically change certain values each time a layout change happens (to avoid setting up an on layout enter and on layout exit script trigger on every layout)

 

I have been working with FileMaker for a little over 8 months now and am getting into my second solution. My first solution used a complicated go to layout script that took in script parameters and the name of the current layout to calculate the name of the layout to go to. Needless to say, this also requires a very strict layout naming for any new layouts, but works very well for this specific situation. However in my second solution, there isn't a need for such a complicated layout maneuvering so I'm considering hard coding in layout changes. My script takes 2 parameters (one optional). The first is the layout to go to and the second is the Layout ID Type (not sure what the best name for this is). The second parameter is either "ID", "Name", or "Number" corresponding to whatever the first parameter is. If nothing is entered, it assumes it's an ID (if first parameter is a number) or a name (if first parameter isn't a number).

 

What do you use to switch layouts?

Outcomes