The FileMaker New Window Script Step

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

New Window Script Step
When FileMaker 7 was released, a powerful new feature allowed you to have multiple windows open within the same file. The New Window script step allows the developer to script the experience of opening a new layout window in FileMaker. By default, the new window will look exactly like the previous window but be offset a little bit lower (if screen size allows) and a little bit to the right (if screen size allows). So the new window will be attached to the same file, the same layout and the same record.

Now we come to the interesting options you have for this script step. On the surface, they seem like a very reasonable set of options including what to name the window, how tall is it, how wide is it, how far should it be from the top and how far should it be from the left. As you might have guessed from the need to control what appears on the computer screen, the measurements are evaluated in pixels. You can type in the options or you can use a calculated value. Using the calculated value allows you to leverage a bevy of Get functions that will tell you about the users computer screen, the other windows on the screen and more. When you think about things like script variables, custom functions and plug-ins, your windowing options can become very robust indeed.

Oh, there is also a bevy of other Window related scripts steps! So you can now see that you can exert expert control over your FileMaker windowing experience.

HOW IT IS USED
In the few short years this option has been available, the uses are almost too wide to list here. I mean I could technically, but I have other things to do this week as well. Some of the uses from the top of my head are viewing multiple areas of the same database at the same time, using a layout as a robust dialog box experience for the user and performing actions in a new window / then closing that window when the actions are complete.

FYI...
Since a new window will be attached to the same file, the same layout and the same record, it is possible to lock yourself out of a record. Clicking into a field in one window will lock that record in that window and thereby refusing modification of that record in the other window. So it is possible to experience record locking in single user mode.

When a FileMaker database is being hosted over a network, only one user can modify the same record at one time. The user that first enters a record locks it until they commit the changes or leave the record. If you try to modify a record that another FileMaker user is currently browsing or editing, you will get a message telling you that modifications cannot be done. The dialog box will also provide the name of the user that is on that record. This is how databases protect themselves from editing conflicts.  (read more)

Got To Know Factor - 10

By the way, here is a list of some functions you might also employ in your windowing scripts.

The Get(WindowContentHeight) Function
The Get(WindowContentWidth) Function
The Get(WindowDesktopHeight) Function
The Get(WindowDesktopWidth) Function
The Get(WindowHeight) Function
The Get(WindowLeft) Function
The Get(WindowMode) Function
The Get(WindowName) Function
The Get(WindowTop) Function
The Get(WindowVisible) Function
The Get(WindowWidth) Function
The Get(WindowZoomLevel) Function

=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.