3 Replies Latest reply on Dec 5, 2013 10:02 AM by philmodjunk

    Dynamic Tabs

    AbdoulBaldé

      Title

      Dynamic Tabs

      Post

           Hello, 

           I am using tab panels in which I have inserted a portal to display related info when clicking on a button in the Layout. My Tables are; 

      Themes

           Theme_ID

           Theme_Name

           Theme_Subcategories

      Contents

           Content_ID

           Content_Name

           Theme_Subcategory

           Theme_Name

            

           I have linked the 2 tables using Theme_ID. 

           On my Layout, the  Theme_Name are displayed in buttons (One for each Theme) 

           I have created a tab control where I have inserted the portal to display the related content. 

            

           Is there a way to have dynamic tab panels which will correspond to the Theme_Subcategories (thus will change when another button is clicked)? 

            

           Please see screenshot of what I have currently set up. Right now user has to scroll to view content for each subcategory.

      Screen_Shot_2013-12-05_at_12.17.49_PM.png

        • 1. Re: Dynamic Tabs
          philmodjunk

               You can put the same portal on each tab and set up different portal filters that filter for specific sub categories. The buttons can simply use go to object to select the appropriate tab. (And you might just remove the buttons and have the user click the tabs.)

               Note that you have to use the Name box in the Inspector to assign each tab panel a different object name to use with your button scripts for the buttons to work.

          • 2. Re: Dynamic Tabs
            AbdoulBaldé

                 Thats the issue. I have to create the tabs in advance but some themes will require 2 tabs (because it has 2 Theme_Subcategory records) other will require 3 or 4 depending on the number of records in the Theme_Subcategory Field. from my understanding of your explanation the tabs must be set in advance right? Is there another solution?

                  

                 Thanks. 

            • 3. Re: Dynamic Tabs
              philmodjunk

                   Yes. If you are going to use a tab control for this, the tab panels must be created in advance.

                   But you don't really need a tab control for what you have described.

                   You can set up a single portal, not part of any tab control and your buttons can update the portal to show different related records.

                   The relationship for your portal can include a match field that matches only to a specific sub cateogry

                   Themes::ThemeID = Content::ThemeID AND
                   Themes::SelectedSubCat = Content::SubCateogry

                   Your buttons can change SelectedSubCat to different subCategory values to show different content in the portal. (And if there is never more than one record to show for a given selected subCategory, you don't need the portal, you can just add the fields from Content to your Themes layout.