6 Replies Latest reply on Aug 21, 2015 11:24 AM by philmodjunk

    auto Tab control



      auto Tab control


       I have a field that will contain 1 of 10 possible names. I also have ten tabs each with one of those names on it.  Can a script be written or something be done  to have it open the tab when the field contents matches the tab name?

        • 1. Re: auto Tab control

          Will the 1 of 10 possible names ever change?  Where do these names come from?

          Are you trying to have a user only go to their 'Tab"?

          Much more detail please :)

          • 2. Re: auto Tab control

            There could possibly be ways to do what you want that do not use a tab control at all.

            If you give each tab panel an Object Name using the Name box in the Inspector, you can use Go to Object to bring that Tab Panel to the front. This method also works with Slide Controls.

            • 3. Re: auto Tab control

              The field names will always be the same per record but different on any given record. The tabs are always the same on all the records but I only need one tab per record. The tab contains info for the part. The part is one of ten categories.

              Example: Let’s say I have a record for a D size battery. The battery would be an electrical part. So the field named "type" would say electrical. One of the tabs would also be titled electrical. The tab for electrical has the particulars for electrical parts such as weight and Dimensions voltage and amperage etc. Since the field Type is electrical when going to this record can the tab "electrical" be auto selected as opposed to the default tab.

              So the next record let’s say is for a car, the field named "type" would be Transportation and there would be a tab for transportation and when the record for the car is chosen the tab auto selected would be Transportation.

              I hope this clears some things up with what I would like to do.

              • 4. Re: auto Tab control

                I wonder if you could just use an OnRecordLoad along with Phil's suggestion.  Name the tabs the same as the type in the inspector. The script could be something like:

                Set Variable [$tab; Value: Table::TypeField]

                Go to Object [$tab]

                So if type was 'electrical', and the tab was identically named, it should go to the electrical tab.

                • 5. Re: auto Tab control

                  double post...thanks Captcha...lol

                  • 6. Re: auto Tab control

                    But I'm not sure there's much point to using a tab control at all. Might be simpler just to have a set of layouts and just use OnRecordLoad to change layouts to the layout that's appropriate for the type.

                    And keep in mind that tab controls are really set up to work from the context of a single record. Changing tab panels does not change records.