Select Window
 
Purpose 
Specifies a window by name and makes it the foreground window.
See also 
Format 
Select Window [Current Window/Name:<name of window>; Current file]
Options 
 •
Current Window brings the active window of the file that contains the script to the foreground.
 •
Window Name specifies which window you want FileMaker Pro to bring to the foreground.
 •
Current file only restricts matches to the current file (not selecting this option matches all available FileMaker Pro files).
Compatibility 
 
Where the script step runs 
Supported 
FileMaker Pro 
Yes 
FileMaker Server scheduled script 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 6.0 or earlier
Description 
Because FileMaker Pro script steps are always performed in the foreground table, it is sometimes necessary to bring a specific window to the front. Use this script step when you are working with scripts in multi-table files to make certain that a script step is performed in the intended table.
Notes
 •
 •
 •
For example, a layout in the file Data Entry contains a related field from the file Companies. When this layout is displayed, FileMaker Pro opens the Companies file in a hidden state. To open a new window displaying the hidden related file, use a script such as:
Open File[Open Hidden; "Companies"]
Select Window[Name: "Companies"]
To return the file to its original state, perform a Close Window [] script step to close the open window.
 •
Example 1 
Selects the Print Invoices window. If the Print Invoices window is not open, creates a new window and goes to the Print Invoices layout.
Select Window [Name: "Print invoices"]
If [Get ( LastError ) = 112]
New Window [Name: "Print Invoices"; Style: Floating Document]
Go to Layout ["Print Invoices"]
End If
Related topics 
Defining calculation fields
Script steps reference (alphabetical list)
Script steps reference (category list)