FileMaker's menus are all about power. Through them, you can controland limityour users' access to the whole feature set. As the developer, you need all those commands to do your design and development of your database, but there are plenty of commands that give too much power to your users, particularly folks who don't much computer experience or who aren't shy about experimenting with commands…even if they aren't sure what might happen at the other end of a dialog box.
Brand new to version 8 is the power to customize FileMaker's menus. You can remove the Delete All Records and the Replace Field Contents commands for all your users, or you can remove them only from certain users' privilege sets. If you're the type of developer who likes to take charge of the user interface (see the box on Section 14.6.5, Custom Menus are your dream come true.
Here are just a few of the things you can do:
You can create and edit Custom Menus only in FileMaker Advanced, but anyone can use them with FileMaker Pro or in a runtime version of your database. These menus don't transfer to files you publish on the Web, though (Section 18.2). When you create Custom Menus for a database, be sure to provide a User Guide or similar documentation explaining what your custom commands do.
You can use Custom Menus to supplement, and even go beyond, privilege set features. For example, if you want to limit data entry people to using the copy and paste buttons that run your scripts, remove the Edit menu for users with that privilege set. They won't be able to use keyboard shortcuts to cut, copy, or paste. Removing the View menu prevents the Mode pop-up menu, toolbar, and all related keyboard shortcuts from working. (But you'll need to do some work providing replacement commands in your buttons and menus.)
Note: As powerful as Custom Menus are, they're no substitute for good security practices, as discussed in Chapter 16.
19.6.1. Editing a Menu
All new files you create use FileMaker's standard menu set unless you tell them to use a custom set. Just as each new file contains three default privilege sets, you get one set of custom menus that you can edit to suit your needs. And as with privilege sets, some items are in brackets and cannot be edited or duplicated, but you're free to create new menus with the same name and customize them.
Your goal for this exercise in customizing menus is to remove menu items that might confuse your users. When people are just learning FileMaker, simplified menus are less intimidating than masses of unfamiliar commands. You can also help protect your database from damage by someone unwittingly choosing the wrong command. You start the process by editing the View menu so that only a few items show up.
Or you can double-click an item to edit it. The Edit Custom Menu window appears (Figure 19-12). This where you tell the custom menu what it should look like and how it should behave.
The Override Title option changes what the user sees in his menu bar. You changed it to Switch since the word "View" is too vague for beginning users. Plus, you don't want them getting confused if they pick up FileMaker's manual (or this book) for help. The changed menu name should clue people in that they need to look at your custom documentation for help.
The menu's name in this dialog box remains View Copy; that's how you know it originated from the normal View menu, not from scratch.
All highlighted items disappear when you click the trash can icon (those hyphens represent divider lines in menus). You should have only three mode menu items, a hyphen and a Go to Layout menu (a total of five items) remaining in the list.
This menu item title replaces the text that appears in the list. Your users will see a command called Browse, not Browse Mode. Notice the quotation marks around "Browse." If you forget (or refuse) to type the quotes, FileMaker obstinately puts them back in for you. That's your indication that FileMaker considers that text a character string, and that's a further cue that the Specify button gives you access to the calculation dialog box.
Use terms that are easy for folks to comprehend. Most people already understand what Print Preview does, but the meaning of Preview Mode is a little murky.
You've just told FileMaker to display the customized version of your View menu.
The View menu now says "Switch." When you click it, there are only four items. Notice that the Layout tool is grayed out, and Layout Mode has disappeared from the Layout pop-up menu at the bottom of your screen. Also, the commands in the pop-up menu match the changes you made in the View custom menu.
By editing menus to suppress items that might confuse those who haven't had indepth FileMaker training, you've made your database a friendlier place to work. But don't stop there: In the next section, you'll learn how to create menus that show lists of commands you do want people to see, like your scripts.
19.6.2. Creating a New Menu
Using the steps described in the previous tutorial, you can edit FileMaker's menus to your heart's content, renaming them, and deleting extraneous commands to make room for new ones. If you don't necessarily want to delete any existing menus or commands, or even if you do, you can always create additional menus from scratch.
If an existing menu is similar to what you need, you can use it as a template when you create new menus. But in this case, you don't need any existing menu commands because you'll attach your scripts to a new menu. When you click OK, the Edit Custom Menu window appears, just as in Figure 19-12. This time, though, you won't edit it, you'll build the menu from the ground up.
Since you started with an empty menu, FileMaker assumes you want a custom name. If you don't type a name, the word "Untitled" appears in your menu bar.
You don't want your scripts run from either Find or Preview modes, so by telling the menu not to even show up in those modes, you're adding another layer of security.
This action creates a new command, but doesn't use one of FileMaker's canned actions. You could use this method to build a new menu that picks and chooses from various default menus, but in this instance, you're going to run your scripts from the new Invoices menu.
The Specify Script Options shows all the scripts you've created in this database file. To add more scripts to this menu, repeat the last two steps until you've created new commands for all the scripts you want. The arrows to the left of each item let you rearrange them. Click the Separator button to create a divider line in the menu.
The Edit Menu Set window appears.
The Invoices custom menu is now a part of the new custom menu set and it appears between the Records and Scripts Menu.
So far, you've simplified one of FileMaker's menus and created a custom menu from scratch. Now you need to get rid of a menu that strikes fear even in the hearts of experienced FileMaker users: You're going to completely suppress the Windows menu.
19.6.3. Removing a Menu
At first glance through the Define Custom Menus dialog box, you might think that you just click an item in the Custom Menu list, and then click Delete to remove it. But you'll run into problems if you do. First, if you highlight menus with brackets around their names, the Delete button is inactive. And if you select an item where the Delete button remains active (Help), and then delete it, you get a nasty surprise when you click OK and return to your file. You see the text "Missing Menu" inserted in the menu bar, and the Help menu stays right where it was. Despite these obstacles, you can remove an entire menu; you just have to dig a little deeper to do it.
Tip: Troubleshoot a file for missing menu items by running a DDR (Section 19.3), or by checking Get ( LastError ) after you load a menu set in a script.
As mentioned previously (Section 22.214.171.124), the Window menu can cause problems for new users. For example, the Show command lists files that they may not know are open. Hiding and showing windows is also perilous for new users if they don't understand how FileMaker manages windows. Instead of bothering people with stuff they don't need to know, you can just suppress this menu entirely by removing it from the menu bar.
The Edit Menu Set dialog box appears.
This descriptive name helps you remember the menu set's purpose. If you like, type additional information in the Comment box.
Usually brackets on a list item indicate you can't delete it. But you can delete it from the display list, as you've just done. The [Window] menu remains in the Available Custom Menus list at left. If you change your mind, you can move it back into the display list to restore it.
Back in your database, the Window menu is gone entirely from the menu bar. This menu configuration is ideal for your data entry people, but not so great for administrative users, who understand the Window menu and use it all the time. Read on to find out how to tailor sets of menus for people with different privilege levels.
19.6.4. Installing Custom Menu Sets
FileMaker Pro Advanced lets you create a set of custom menus (see Figure 19-13) and use it as the default for a file, meaning that everyone who uses your database sees it, every time. But since the people using your database may have different levels of skill (and trust), you may want your custom menus to adapt accordingly. In fact, if you've read this book's chapters on layouts and privilege sets, you have all the tools you need to make the right menus appear to the right people at the right time. It's a simple matter of assigning menu sets to these existing features. You can conceal certain menus and commands from people who don't need them, but keep them available for everybody else. Or maybe you just want menu items to show up when they make sense for the active layout.
Once you've created menu sets using the steps outlined earlier in this chapter, you can install them in any of several ways:
Warning: Since you're effectively removing features for your users when you customize menus, thorough testing is a critical part of the process. Be sure to test menus with all affected layouts, privilege sets, scripts and across platforms. In FileMaker Pro Advanced, choose Tools Custom Menus to switch among sets as you test them.
Part I: Introduction to FileMaker Pro
Your First Database
Organizing and Editing Records
Building a New Database
Part II: Layout Basics
Advanced Layouts and Reports
Part III: Multiple Tables and Relationships
Multiple Tables and Relationships
Advanced Relationship Techniques
Part IV: Calculations
Introduction to Calculations
Calculations and Data Types
Part V: Scripting
Part VI: Security and Integration
Exporting and Importing
Sharing Your Database
Part VII: Appendixes
Appendix A. Getting Help