9 Replies Latest reply on Oct 10, 2015 12:36 PM by Extensitech

    Creating Tabs Only When Needed?


      I'm wondering if anyone has any advice for me on this. I have attached a screen shot to better explain.


      So what we want to be able to do is add a tab called "follow up" when needed, but otherwise "follow up" isn' there/doesn't show. The reason behind this is that many of our clients have just one visit with us, but some have 6 or 7. So I don't want 8 tabs for visits when a particular clients only needs one, but sometimes we do need all 8 (or however many). I'm not sure if this is possible or if there's a different way to accomplish this.


      Screen Shot 2015-10-09 at 11.36.51 AM.png

        • 1. Re: Creating Tabs Only When Needed?

          The BEST option would be to use a button bar, as you can hide segments inside of the button bar by calculation. The button bar also auto-resizes to a fixed with, so you're not left with white space.


          You can then use the buttons in the bar to navigate to your tabs. You can hide the top of the tab object a couple of different ways (EG behind your button bar)

          • 2. Re: Creating Tabs Only When Needed?

            Fast non FM 14 solution: add a hide when, duplicate the whole enchilada, remove the follow up tab, add a different hide when, align with the existing one. Now you pilot what's shown through the hide when condition.

            • 3. Re: Creating Tabs Only When Needed?

              Oh interesting idea! I haven't used the buttons yet. Is it possible to do all these types of fields within a button?

              • 4. Re: Creating Tabs Only When Needed?

                I think you misunderstood a bit. The buttons drive the navigation to toggle between the tabs in your existing tab object. Basically taking the place of the "tabs" themselves.


                You would still have a tab control housing the fields for each of your tabs (intake form, consent form, etc..) you would just be navigating to each form via script.


                Say you setup a segment of the button bar with a script to go to tab 1, you would just give your first tab an object name of "TAB 1", and then use the "Go To Object" script step to go to "Tab 1". Repeat and add segments to the bar to correspond to all of your tabs. Then you can select individual segments and use the "hide object when" calc in the inspector to hide things when you don't need them.


                Here's a free tutorial on using button bars:

                FileMaker 14 Tutorial: Buttons Bars - YouTube

                • 5. Re: Creating Tabs Only When Needed?

                  I have a similar issue. So, if I may ask, using a button bar to navigate between tabs and using a tabbed form in the layout, won't that effectively show duplicate tabs? I'd find that confusing.

                  • 6. Re: Creating Tabs Only When Needed?

                    You need to properly hide your tab control tab names. You can hide them behind a solid colored rectangle or your button bar, or even just name the tabs with empty spaces and give the tab names 4pt text to make the tabs very small.

                    • 7. Re: Creating Tabs Only When Needed?

                      Makes sense. Thx.

                      • 8. Re: Creating Tabs Only When Needed?

                        siplus' method is a pretty easy way to go, but it does have drawbacks. A couple, for example, are 1) It duplicates the number of objects on your layout (each field is listed twice, for example), 2) if layout objects are named for use in navigation scripts (for example), the layout names on the duplicated tab control will be modified ( "object1" would become "object1 2", for example), 3) hidden objects are NOT hidden to scripts, so be careful. Still...if you weigh those and decide you're safe, it would give you what you're after.


                        I've outlined a way I've been working with at: djdataworks.wordpress.com. I've attached a sample file here. If you switch to the second layout (by default it will open to a layout which hides/shows panels based on a user's privilege set), you'll see a layout called "HideATabPanel DATA Driven". In that layout, if "Example Field 1" contains "Dog", you'll see only even odd numbered panels. Change it to "Cat", and you'd see only even numbered panels. For you, wanting to show or hide that 8th panel, it would work very well, I imagine.






                        DataWorks | Helping to make sure your data works for you.

                        • 9. Re: Creating Tabs Only When Needed?

                          A file I uploaded here (Re: Assign tab names from several records in a table) might help illustrate the idea mikebeargie is describing. Using a slide panel with button bars instead of a tab panel gives you a lot of control.


                          The demo file was to illustrate something else, but if you look at the second of the two layouts in the file, you'll see the hide when technique he's describing. (I'm showing the tab dots just to make the method clearer, but I'd shut them off normally.)


                          Incidentally, if you're hiding a panel for reasons other than convenience, you can add a trigger onPanelSwitch and check an extended privilege. I've ended up doing this pre-button bar, and while the method won't hid a tab like this does, it will prevent users from going there when they shouldn't. (Still not a substitute for privilege sets, of course.)


                          Chris Cain