Returns a list of the names of windows that are currently open.
{fileName} - the name of an open database file (local or remote).
Parameters in curly braces { } are optional.
Data type returned 
Originated in 
FileMaker Pro 6.0 or earlier
Use the optional fileName parameter to only return windows that are based on the specified file. The window could be visible, hidden, or minimized. The order of the names in the list matches the current stacking order of the windows. The visible windows are listed first, then the minimized windows, and then the hidden windows. If there are no databases or windows open, an empty string is returned.
Note  Even if you close a file, it may remain open as a hidden file if the window of any other file is displaying data from that file. (For example, another window may be displaying related data from the file you attempted to close.) FileMaker Pro will close the file when you close all the dependent windows.
WindowNames returns Customers and Invoices separated by a carriage return when those windows are currently open.
WindowNames(“contacts”) returns a list of windows that are based on the contacts database file.
Related topics 
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas