FileMaker 12 Layout Tricks: Hiding Tabs

If you wanted to use a tab control on your layout but hide it from your users, you used to have to cover it with another tab and/or make the tab text very small. This is because you both have to visually hide the tab AND prevent users who actually click on it’s tab controls from activating it. While this worked, the layouts were kind of hard to use in layout mode: it was often hard to find the tabs at all.

Fortunately this is a lot easier in 12. And not only because tab controls work in layout mode(!).

Here is how we’re hiding tabs now.

1. Create the tab as you normally would, but make the tabs big and readable so you can find them in layout mode.

2. Turn the fill and line colors off for the tab.

3. Conditionally format the text to only show in layout mode. (You can conditionally format tab text in 12). Use this calc…

Get ( WindowMode ) ≠ 4

…and when that is true, turn the text size to 300pt, effectively hiding the text.

4. So far we’ve hidden the tab. To disable it in browse mode, create a simple script with one step called “Disable Tab Control”. Create the following steps:

If [ isempty ( Get ( ScriptParameter ) ) ]

Exist Script [Result: 0]

End If

Don’t forget that result = 0 in the exit script line.

5.  Now add an OnTabSwitch script trigger to your tab, calling this script with a script parameter of “Get ( ScriptName )”. This will disable the tabs when they are clicked by hand in browse mode, but they’ll work when a script is directed to them using Go To Object Name (because there will be a script parameter passed in as the script name).

Best of all, the tabs are easy to read and select in layout mode:

Layout Mode
Browse Mode

Here is a short video of this in action, and there is a great article on the new tabs in 12 on Daniel Wood’s weetbicks blog. Enjoy.

(Want more tips like this? Sign up for our newsletter.)

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

18 Comments

  • George christiana

    A little late to the game, but this is an awesome technique. Works like a charm in fmpro.

    Does not work in web publishing though. Tabs are still showing somehow and clickable. Any pointers on that?

  • Tiago Costa

    Bow down to the king! Awesome, thanks !

  • Oreste

    I just made the tab switchers off screen. works well

  • patrick

    Any body interested in being able to disable/enable any one or more tabs and programatically show/hide individual tabs based on a condition?

    • =) I’ve always wished that tabs we’re exposed to access privileges like layouts were, so tabs you weren’t allowed to visit just weren’t there.

      • Shuffling around the missing tabs is why many of us still “fake” tabs, but it’s definitely becoming less necessary. Why don’t you post the demo to TechNet if not your own site.

        • patrick

          Just had the same thought, will start a new thread on technet

      • patrick

        Yes, I have produced a demo file that shows and hides and enables and disables tabs based on pretty much any criteria, the only problem if say the third tab out of four or five is hidden and disabled the other tabs don’t shuffle down to group the tabs together so I have gone with just greying the disabled tabs out, when they are clicked on nothing happens and because the hover colour is the same as the disabled colour there is no indication that the tab can be clicked.
        I’ve no idea where to upload the file to, any suggestions welcomed:)

  • Thank you!! – You’ve made my life about a hundred times easier!

  • smacleod

    this works great if you are not in the middle of a script. if the user is in the middle of a script, paused, then this doesn’t work. do you have a workaround for this?

    • Just replace the test with one looking for the scripts which allow the tab to fire, like this:

      If [ Get ( ScriptParameter ) ≠ “Go To Tab Script” ]

      Exist Script [Result: 0]

      End If

  • […] flexible object: and doing that in 12 was substantially simpler than doing it in 11. We’ve already written about how hiding and conditionally formatting tabs is a huge help in 12, and that was the case here […]

  • Hi,
    didn’t you mean Get ( ScriptName ) as a script parameter?

  • woodsmicah

    Great tip John, thanks. Based on your technique, I’m now able to make my tab heights taller without having to display a huge text size. I find the tab height to be a bit short when using 14 pt. text (IMO the spacing doesn’t look right and it’s too small for the iPad). The problem of course is that when you set the text to 18 pt., it’s too big. By using conditional formatting, I set the tabs to 18 pt. but then change the text back to 14 pt. It works great – nice big tabs but with a text size that matches the rest of my layout.

  • Christopher Tipper

    So, for those of us who aren’t developers, why? I’m sorry, but I’m not getting it.

Leave a Reply

Your email address will not be published. Required fields are marked *

Check out some of our other posts ...

New Week Views in DayBack for FileMaker

You can now expand DayBack’s week views to show two or three weeks at a time. We’ve been using this internally in beta mode for a few weeks, and it’s very helpful to see what’s coming up next week while navigating this week’s work. Find tips on how to work with these new views on the DayBack blog.

To-Do Lists in FileMaker – New in DayBack Calendar

Now create and manage FileMaker to-do lists directly from the Unscheduled Items sidebar in DayBack Calendar. Our latest extension brings to-do behavior to any FileMaker table. Like unscheduled items, this behavior is based on a new checkbox field in your table, so some or all of your records in the table can be treated as to-dos. Mark your to-do’s done as you complete them, or drag them into the calendar to schedule time to work on them. See it in action here: Customize Your To-Do Lists This extension was designed to be pretty a scaffold onto which you could build your own, more specific to-do behaviors by customizing the action itself or the FileMaker scripts tha manipulate events. Here are some ideas to get you started. Add To-Do Lists to Your FileMaker Calendar If you haven’t already enabled the unscheduled sidebar along DayBack’s right edge, you can learn how to turn that on here: unscheduled items in DayBack. Then, download the custom action and learn how to configure it here: To-Do Lists in DayBack Calendar.

Improved Resource Selection

We’ve made some big changes to how you filter and assign resources when editing events in DayBack. These changes will make it much easier to work with large numbers of resources, especially for folks assigning multiple resources to the same event. Watch a video of the new behaviors and learn more here: Adding Multiple Resources to an Item. If you haven’t looked at your resource field mapping in a while, here is how you set that up: Mapping the Resource Field in FileMaker. Please get in touch if you have any questions about this; we’re here to help.

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes, gaps don’t tell the whole story. You may have invisible criteria like skill-matching, cleaning requirements, or multiple resources to schedule at once. Or you may be on the phone with an opportunity and must suggest available times as quickly as possible. In these cases, DayBack can suggest the best slots that match all of your requirements. Scheduling Criteria Are Often Invisible In the movie above, schedulers can see openings for the two technicians, but they can’t easily see if the required rooms and equipment are free at the same time. While DayBack can show different types of resources simultaneously, as the number of criteria increases, it can be hard for schedulers to see everything at once and still make good decisions. Our customers often have rules that constrain when an otherwise open slot can be scheduled. Here are some of the invisible criteria we’ve built out for customers: Because DayBack is highly scriptable, it can scrub open slots against a variety of criteria to render just the slots that fit all your requirements. When multiple slots match, DayBack can even rank them so you can present the most ideal slots to your clients first. You Have to *See* Slots in Context to Make the Best Decisions Many scheduling apps present possible appointments as a list of dates and times. Without showing more information about each slot, schedulers can book days too tightly, always suggest the same providers first, or create huge gaps in some provider’s schedules. Ranking slots can help, but we’ve found that highlighting ideal slots alongside existing appointments gives schedulers the information they need to make the best decisions. We’ve seen schedulers quickly offer to split appointments or to slightly change services when they see available slots in the context of other appointments, trainings, vacations, and breaks. Getting Started We customize the recommendation of slots for each deployment as part of DayBack’s implementation packages. Please get in touch if you think DayBack could make a big impact on your team.

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2024 SeedCode, Inc.