Multi-window management from scripts

Expert

Open, target, and close windows programmatically, and pass context between windows using script parameters.

What you'll learn

  • How to open a new window and set its initial state
  • How to target a specific window from a script
  • How to pass data back to the calling window when closing

FileMaker allows multiple windows open at once, each with its own found set, current record, and layout context. Managing windows from scripts — knowing how to target the right window, pass data between them, and clean up when done — is essential for building workflows that span multiple views.

1/3
1

Opening a window with a specific layout and record

New Window creates a new window. Immediately follow it with Go to Layout and navigation steps to set its initial state. The new window becomes the active window after creation.

FileMaker Script
Set Variable [ $contactId ; Value: Contacts::id ]
New Window [
  Style: Document ;
  Name: "Contact Detail" ;
  Height: 600 ; Width: 900
]
Go to Layout [ "Contact Detail" ]
Set Variable [ $found ; Value:
  ExecuteSQL ( "SELECT 1 FROM Contacts WHERE id = ?" ; "" ; "" ; $contactId )
]
# Navigate to the specific record
Set Field [ Contacts::id_search ; $contactId ]
Perform Find [ ]

Sign in to track your progress and pick up where you left off.

Sign in to FM Dojo