Go to Layout

Switches to the specified layout.


  • original layout is the active layout when the script is initiated.

  • Layout specifies a layout by name from the list of layouts you've defined in your file.

  • Layout Name by calculation specifies a formula whose result is a valid layout name.

  • Layout Number by calculation specifies a formula whose result is a valid layout number. (Layout numbers correspond to the order of the layouts in the file.)

  • Animation (FileMaker Go only) specifies the animation to use for switching to the new layout.


Product Supported
FileMaker Pro Partial
FileMaker Go Yes
FileMaker WebDirect Partial
FileMaker Server Partial
FileMaker Cloud Partial
FileMaker Data API Partial
Custom Web Publishing Partial

Originated in version 

6.0 or earlier


This script step is useful when you begin a script to make sure the user starts with the correct layout displayed.


  • The Go to Layout script step can only take you to layouts defined in the same file as the script itself. To go to layouts in an external file, define a script in that file using the Go to Layout script step, and call that script from the first file using the Perform Script script step.

  • Layout Name by calculation recognizes layouts with the same names in the order in which they were created. If you have multiple layouts with the same name, either select the specific layout you want from the layout list or use Layout Number by calculation.

  • Define an unstored calculation field with the Get(LayoutNumber) function and place it on your layouts to verify the layout numbers of your layouts.

  • When a file has two or more tables, FileMaker Pro appends the name of the source table to the layout name for clarity. For example, Go to Layout ["Layout #2" (TableB)].

  • You can't use animations for switching layouts using the Go to Layout menu item or the status toolbar buttons.

Example 1 

In the active window, goes to the Summary field on the Invoice Details layout.

Go to Layout ["Invoice Details"]
Go to Field [Invoices::Summary]

Example 2 

Checks which device is running the database and goes to the appropriate layout.

If [PatternCount ( Get ( ApplicationVersion ); "iPad" )]
    Go to Layout ["Customers iPad"]
Else If [PatternCount ( Get ( ApplicationVersion ); "Pro" )]
    Go to Layout ["Customers"]
    Go to Layout ["Customers iPhone"]
End If
Sort Records [Restore; With dialog: Off]

Example 3 

Switches to the Contacts layout while zooming in.

Go to Layout ["Contacts"; Animation: Zoom In]