Level: Beginner, Version: FM 12 or later

Show/Hide Formatting Bar

Note: A special thanks to Jason DeLooze for sharing this technique, which neatly remedies a small, but vexing, annoyance.

Demo file: Show-Hide-Formatting-Bar.zip

6-13-2014 10-04-55 PM

Have you ever wanted to have a script toggle the Formatting Bar on/off in browse mode? If so, you will discover that FileMaker does not provide a “Show/Hide Formatting Bar” script step.

In FileMaker 12 and 13, the closest you will get to that script step is this one…

6-13-2014 10-32-50 PM

“Allow Formatting Bar” is a very odd script step, because “on” enables the ability to display the Formatting Bar, but (unless you know the trick, which we’ll get to shortly) does not actually display the bar itself.

6-14-2014 12-13-30 AM

Meanwhile “off” both disables the ability to display the Formatting Bar, and if the bar is currently visible, hides it as well.

6-14-2014 12-13-31 AM

There are two seemingly-identical demo files in today’s download:

  • Formatting Bar – Non-working
  • Formatting Bar – Works

…and as you might expect, the buttons work in the second second demo, but not in the first.

6-14-2014 1-03-04 AM

Incidentally, I could have attached the buttons to scripts, but in the interest of simplicity instead attached them directly to the “Allow Formatting Bar” action, like so:

6-14-2014 9-22-55 AM

Here are the steps to enable the buttons to show/hide the formatting bar:

  1. Make a copy of the “non-working” version of the demo — let’s call it simply “Formatting Bar”
  2. Open “Formatting Bar” — the file must be local, not hosted.
  3. In browse mode, click the “Formatting Bar: On” button
  4. While still in browse mode, choose “Formatting Bar” from the “View” menu, and at this point, the Formatting Bar should be visible.6-14-2014 9-47-04 AM
  5. Go into layout mode.
  6. From the View menu, and choose “Formatting Bar” from the “View” menu. (Yes, you already did this in browse mode, but you need to also do it in layout mode.)
  7. Make some minor change to the layout, for example, select the buttons and move them up a point or two.
  8. Return to browse mode, and if the following dialog appears, click “Save”
    6-14-2014 10-17-08 AM
  9. Now click the two buttons in browse mode, and observe that they show and hide the Formatting Bar… and henceforth the “Allow Formatting Bar” script step will behave the same way.

One potential problem with this technique: if, when the Formatting Bar is visible, your clever user disables it via the View menu, the buttons will stop working until the file has been closed and then re-opened, at which point the buttons will again function as desired.

To prevent the clever user from causing this mischief, use a custom menu set to remove the “Formatting Bar” entry from the View menu.

18 thoughts on “Show/Hide Formatting Bar”

  1. This doesn’t work when the file is hosted on a server.
    If your platform is OS X, the following Applescript script set will work:

    tell application “FileMaker Pro Advanced”
    tell application “System Events”
    tell process “FileMaker Pro Advanced”
    click menu item “Formatting Bar” of menu 1 of menu bar item “View” of menu bar 1
    end try
    end tell
    end tell
    end tell

  2. Hello!
    Thanks for taking the time to write this up. It is exactly what I have been looking for!

    I have followed these instructions to implement this hack into my own solution, however I cannot get this to work after I close the window and/or the file. Essentially, it does not persist on my solution as it does with the sample files you have included here.

    Is there something I might be doing wrong? Or perhaps this hack doesn’t work quite the same in FMPro Advanced 14? I followed the instructions provided enough times that you could call me insane (doing the same thing over and over, expecting different results) lol.

    Thanks in advance for any help you may be able to provide.

  3. After inheriting an existing host based solution for support/further-development, the customer wanted the Formatting Bar to be ON by default since she had to turn it on every time she used the file. When attempting to use this method while the file was hosted, it did not work. Moving the file locally, performing the method on the local file then worked for the local file, and then re-uploading the local version back to the server (replacing the non-working version) caused it to work for the hosted file too!


      1. Just now I followed the instructions in the article, and it’s working fine for me (Win 7, FM 18). I closed and reopened the file twice to confirm.

    1. Two questions…
      1. what happens if you host the “working” version of my demo file?
      2. did you follow the instructions, including step 2?
      > “Open “Formatting Bar” — the file must be local, not hosted.”

      1. 1 i will try tomorrow
        2 what is step 2?
        I use your file and works fine from local
        i use my file and works fine from local
        when i use the file on host from administrator account it works fine but if i open hosted file from user account it doesn’t work BUT if the users chose from menu bar, for one time the formatting bar voice after it work fine until the file is open. when the users close the file and reopen it from host, it doesn’t work again, the users it will chose another time the voice from menu for “activate” the function

  4. For anyone having trouble getting this to work,

    1. Make sure you do not have “Hide all toolbars” ticked in File Options.

    2. Make sure the format bar is on and showing when you close the file locally before hosting it on your server. If it is off, it will not work when reopened. Of course, that means that the format bar will be visible by default when opening the hosted file, so you may want to close it with a script step in your opening script.

    Once I worked out those issues and uploaded to my server it worked like a charm.


Leave a Reply to MattCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.