The Support Group Blog

Attacked by Old Custom Menus

A reader wrote in with a problem:

We just started using FileMaker 11 with databases that were created in previous versions.  In Browse, mode the text formatting button in the layout bar is grayed out.  Is there a way to make this active?

The key clue here to solving the issue was the fact that these files were created in previous versions.  The culprit? Custom menus.

If you are using FileMaker Pro Advanced’s custom menu feature, you have the ability to completely modify the menus your users see.  You can do this on a layout-by-layout basis, or change menus on the fly via script.  Existing menu commands can be altered to perform a script instead (to, say, run your New Customer script when choosing New Record), and you can create completely new menus such as a Reports menu.  You can also remove commands from the menus (for example, maybe you’re terrified of Delete All Records) or eliminate complete menus entirely, such as the Scripts menu.

The commands that you make available in your custom menus also affect any toolbar widget.  If you modify theNew Record command in the Records menu, the New Record button in the toolbar will also be altered to run your script.  If a standard menu command is nowhere to be found in your custom menus, then the corresponding toolbar items get disabled.

That’s what happened here.  The Formatting Toolbar menu item (usually found under the View menu) was missing, because the custom menus were created in an earlier version before the menu item existed.

Here’s the custom View Copy menu as originally created in FileMaker Pro 9:

custom-view-menu-9

And here it is in FileMaker Pro 11:

custom-view-menu-11

Why didn’t FileMaker add the Formatting Toolbar command when it was opened in FileMaker Pro 11?  Well, that would be a pretty big violation of your custom menus.  Imagine that you have spent a significant amount of time customizing your solution’s menus so that whenever a user tries to delete a record, a script to archive it runs instead.  Then in FileMaker Pro 16, a new menu command Delete All Records Permanently And Without Warning gets added (which I really hope they don’t do).  If that menu item were to be instantly added unaltered to your custom menus, you’d have a pretty big problem.  The most FileMaker might do is change a menu item’s name, if it’s using the default (so that Status Area from FileMaker 9 gets renamed Status Toolbar).

Here’s how we fixed it (and, while we were at it, allowed users to customize the status toolbar per usual).  Note that, because custom menus are custom, these instructions will not exactly match all similar cases.  These are based on the default unmodified View menu created in FileMaker 9 (“View Copy”).  The most important part is to somewhere add a custom menu item for Formatting Toolbar to any menu in the menu set used by the layout.

Open Manage Custom Menus from the File -> Manage menu.  Select the Custom Menus tab.  Select theView Copy menu in the list of menus, and click Edit.

By default, there will be two items labeled <unknown>, followed by Status Toolbar (these were the menu items for Toolbars and Status Bar, no longer in FileMaker 11).  Delete both of these <unknown> items.

Click the Create button to create two new command items (in the standard menus, they are below Status Toolbar). On the first, enable the checkbox to base it on an existing command, and choose Customize Status Toolbar.  On the second, base it on the existing command Formatting Bar.

custom-view-menu-fixed1

custom-view-menu-fixed2

And that’s it. And with that, the text formatting button returned.

Share this entry
0 replies
BrowseMode

Sign up to receive news and information about the FileMaker platform and other custom app development tools.

Keep me posted

Most Popular

Developer Resources

News, Tips & Tricks and Demos