This week we want to review Get(WindowMode) that was introduced in FileMaker Pro 6.0 or earlier. As you know it returns 0 for Browse Mode, 1 for Find Mode, 2 for Preview Mode, 3 if printing is in progress and 4 (FileMaker Pro Advanced) if evaluating the function from the Data Viewer and the current window is in Layout Mode. For our purposes today we will look at the returns for Browse Mode and Find Mode.
FileMaker Pro 13 introduced the exciting new feature “Hiding or showing layout objects based on a specific condition or calculation”. This new feature coupled with Get(WindowMode) Function has given a great new tool.
Example Shown with Customers Layout in Layout Mode with Cancel and Continue buttons selected with the inspector showing.
Please note Hide Object When, in the inspector, contains the Function Get(WindowMode) = 0
This View shows the same Customer layout in layout mode with the Find Button, List View Navigation Button and Customer Counter Buttons selected.
Please note Hide Object When, in the inspector, contains the Function Get(WindowMode) = 1
Now in Browse Mode we see that the Cancel and Continue Buttons are hidden.
Now in Find Mode we see that the Find Button, List View Navigation Button and Customer Counter Buttons are hidden.
This example of using Get(WindowMode) Function is an over simplification but shows how a function from FileMaker 6.0 can really shine with a new feature in FileMaker Pro 13.
Have a great Week.
FileMaker 13/12 Certified Developer
The Scarpetta Group, Inc.
Follow us on Social Media!