Reference > Script steps reference > Windows script steps > New Window
 
New Window
Purpose 
Creates a new window based on the foreground window.
See also 
Format 
New Window[Style: Document/Floating Document/Dialog/Card; Name: <name of window>; Using layout: <name of layout>; Height: <n>; Width: <n>; Top: <n>; Left: <n>]
Options 
You can choose one of the following window styles:
Document opens a document window.
Floating Document opens a floating document window.
Dialog opens a dialog window.
Card opens a card.
You can specify these window settings:
Window name is the name for the new window. Window names do not have to be unique.
Layout is the name of the layout to be used.
Height is the height of the new window, in points.
Width is the width of the new window, in points.
From Top is the new window’s distance, in points, from the top of the screen (or for a card, from the top of the layout in the parent window).
From Left is the new window’s distance, in points, from the left of the screen (or for a card, from the left of the parent window).
You can set these window options:
Close enables the close button in the window’s title bar.
Minimize enables the minimize button in a window’s title bar.
Maximize enables the maximize button in the window’s title bar.
Dim parent window darkens the layout area of the parent window for a card.
Resize allows users to resize the window.
Menu Bar shows the area at the top of the window that displays the installed menu set. This option is not supported in macOS or when the active window is a card.
Toolbars shows the FileMaker Pro status toolbar and the FileMaker Go toolbar and editing toolbar.
Compatibility 
 
Where the script step runs 
Supported 
FileMaker Pro 
Yes 
FileMaker Server 
Yes 
FileMaker Go 
Partial 
Custom Web Publishing 
Partial 
FileMaker WebDirect 
Partial 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 6.0 or earlier
Description 
This script step creates a new document window, floating document window, dialog window, or card. It is not necessary to enter values for each option. When no value is entered, FileMaker Pro uses the default value associated with the Window menu > New Window command.
See Working with windows and About window styles.
Notes 
When you disable both the maximize and minimize buttons, these buttons do not appear in the window’s title bar.
You can use a script or button script step to control a window, even if window controls are disabled in the window’s title bar.
In FileMaker WebDirect and Custom Web Publishing, this script step opens a new virtual window in the web browser. Inactive virtual windows remain open but are not visible. To change the current (active) virtual window, use the Select Window script step. Window style settings are not supported.
FileMaker WebDirect does not support the Card window style option.
FileMaker Go does not support the Floating Document and Dialog window style options. Also, FileMaker Go supports the options for positioning and resizing windows only for cards, and always displays document windows in full screen.
Example 1 
Opens a new card with the Customers layout and sorts the records by the Customer ID field.
New Window [Style: Card; Using layout: "Customers" (Customers)]
Sort Records by Field [Descending; Customers::Customer ID]
Example 2 
Goes to the Print Invoices layout in a new floating window and enters Preview mode.
New Window [Style: Floating Document; Name: "Print Invoices"; Using layout: "Print Invoices" (Invoices); Top: Get ( WindowTop ) + 25; Left: Get ( WindowLeft ) + 25]
Enter Preview Mode [Pause: Off]
Related topics 
Go to Layout script step
Defining calculation fields
Script steps reference (alphabetical list)
Script steps reference (category list)