Reference > Script steps reference > Windows script steps > Select Window

Select Window

Specifies a window by name and makes it the foreground window.

See also 


Current Window brings the active window of the file that contains the script to the foreground.

Window Name specifies which window to bring to the foreground.

Current file only restricts matches to the current file (not selecting this option matches all available FileMaker Pro Advanced files).





FileMaker Pro Advanced 


FileMaker Go 


FileMaker WebDirect 


FileMaker Server 


FileMaker Cloud 


FileMaker Data API 


Custom Web Publishing 


Runtime solution 


Originated in 

FileMaker Pro 6.0 or earlier


Because FileMaker Pro Advanced 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 multitable files to make certain that a script step is performed in the intended table.


In FileMaker WebDirect, this script step displays the specified virtual window in the web browser window. The previous virtual window remains open when it is not displayed.

In the FileMaker Data API and Custom Web Publishing, this script step makes the specified virtual window the foreground window. The previous virtual window remains open.

Window name selection is not case sensitive. This script will select the first matching window and bring it to the front.

The Select Window script step does not open a window of a related file when the related file is opened in a hidden state, such as when a file is opened because it is the source file of a related field. To use the Select Window script step with this type of related file, open the related file using the Open File script step.

For example, a layout in the file Data Entry contains a related field from the file Companies. When this layout is displayed, FileMaker Pro Advanced 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: On ; "Companies"]
Select Window[Name: "Companies"]

To return the file to its original state, perform a Close Window [] script step to close the open window.

Select Window can make visible a hidden related file if the script step is executed from within the hidden file.

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 [Style: Floating Document; Name: "Print Invoices";
Using layout: "Print Invoices" (Invoices)]
End If

Related topics 

Defining calculation fields

Script steps reference (alphabetical list)

Script steps reference (category list)