9 Replies Latest reply on Oct 12, 2015 6:50 AM by beverly

    Assign tab names from several records in a table

    ixpose

      Title

      Assign tab names from several records in a table

      Post

      I am trying to build a generic file for many uses. I want to assign tab names i a tab-portal to the contents of a field.

      Example. 
      I have a table lineItems. One field is Category_ID.
      I have a table Category with two fields, Catergory_ID and Category_Name. This table contains seven records.
      I have a tab portal with seven tabs. I want to assign the tab-names with the contents of the Category_Name of the seven records in the table Category.
      How do I do this?

      Thanks in advance!

        • 1. Re: Assign tab names from several records in a table
          philmodjunk

          well we have tab controls and portals but no such thing as a "tab portal". Did you mean "tab control"?

          What will you do when it becomes necessary to add an 8th record? You'd have to make a design change on your layout to add another tab panel. And if you have to delete a record to get just 6 records, you'd have much the same problem with an extra unused tab panel.

          On which of your two tables is the layout based?

          Do you have a relationship defined linking LineITems::Category_ID to Catefory::Category_ID?

          What version of FileMaker are you using?

          • 2. Re: Assign tab names from several records in a table
            ixpose

            Sorry for delayed thank you! Gone phishing

            • 3. Re: Assign tab names from several records in a table
              beverly

              I've revised my use of Tab Control in some solutions where I need greater control of the 'tabbed interface' with a button bar (FM14) and a Slide Control (each button controls each slide). Because the button names can be calculated AND assigned a script per button (as well as have Conditional Formatting per button), this is the bees' knees for all sorts of possibilities.

               

              beverly

               

               

              On Sep 3, 2015, at 3:56 AM, ixpose <noreply@filemaker.com> wrote

               

               

              Assign tab names from several records in a table

              reply from ixpose in Discussions - View the full discussion

              Sorry for delayed thank you! Gone phishing

               

              • 4. Re: Assign tab names from several records in a table
                Extensitech

                Just an aside on that note:

                 

                One such possibility I've managed is to have, for example, a 10-button button bar as "tabs" on a slide control, with hide-when determining when they're not all needed, which works like being able to set a hide when on a tab in a tab control, which is awesome.

                 

                Further, and perhaps cooler, I was able to add left and right arrows based on whether there were more values (tabs) to the left and right, eliminating the problem of running out of "tabs". So, f'rinstance, if there were 10 buttons on the button bar, but 15 values, the user sees a right arrow over the last tab. They click that and it sets a variable, which causes the button calcs to start at value 11 in the list. The user sees the rightmost 5 tabs, with a left arrow over the first one to to back to the first set.

                 

                This pretty much eliminates the issue of running out of room when a client asks for more tabs that there are room for on the layout, without having to create confusing nested tab controls.

                 

                IMHO, probably the coolest possibility with the button bars.

                 

                Chris Cain

                Extensitech

                • 5. Re: Assign tab names from several records in a table
                  ixpose

                  Elegant. Any chance you will be able to let me look at it and possibly license it?

                  BR

                  Per Geijer

                  • 6. Re: Assign tab names from several records in a table
                    Extensitech

                    I'd be happy to share, no need for licensing or anything. What I have now though is pretty tangled up in a bunch of other conventions, custom functions and such. Let me see if I can work you up a simplified demo, and I'll post it here in a few days.

                     

                    Chris Cain

                    Extensitech

                    • 7. Re: Assign tab names from several records in a table
                      Extensitech

                      See attached.

                       

                      I've opted for clarity over efficiency, so there's probably a lot that could be consolidated, especially the repeated calls to LayoutObjectNames. The result could be loaded into a variable and re-used, but I felt it might make the functions less obvious for this demo.

                       

                      I also ended up using one custom function, which I probably could have avoided, but it was handy and easier to include a (simplified) custom function that I already had. It just filters values in a list that start with a string, so I could get the slide object names without picking up other objects.

                       

                      In a production use, I'd probably put most of the hide-whens, button parameters and name functions into custom functions, since they are essentially the same from button to button.

                       

                      Note the layouts for "more buttons than slides" and "more slides than buttons". The only difference is the number of slides. To add slides and have them show up as "tabs", just name the slide object slide_Name.

                       

                      Hope this is clear and useful. Feel free to comment or ask questions.

                       

                      Chris Cain

                      Extensitech

                      • 8. Re: Assign tab names from several records in a table
                        ixpose

                        Thank you so much! I have not had time to study it closely yet

                        • 9. Re: Assign tab names from several records in a table
                          beverly

                          very nice, Chris! as Bruce Robertson has pointed out (here and/or elsewhere), the 'tabs' (button bar) can also be vertical and that's a cool feature we did NOT have using tab panels alone (or at least not without weird work-arounds). I bet this demo could be changed to show that type of UI, too.

                           

                          This method is exactly what I was mentioning in my reply (above) - to use button bar and slide panel instead of tab panel.

                           

                          thank you!

                          beverly