8 Replies Latest reply on Apr 17, 2015 4:23 PM by Dekade

    Going to a tab in a script

    Dekade

      Title

      Going to a tab in a script

      Post

      What is the best way to get to a particular tab when writing a script. I am wanting to access a portal on a tab - via a script step; or two steps or three steps. I have tried a layout step but when creating a layout I see no way to create the layout so that the layout will display a given tab.

        • 1. Re: Going to a tab in a script
          TKnTexas

          I think you need to name an Object on the Tab.  Then you can use Go To Object scrip step,

          • 2. Re: Going to a tab in a script
            philmodjunk

            The following method works to select a panel of a tab control or a slide control. If you use it with a popover, it enables your script to open the popover:

            While In Layout Mode, select the panel you need your script to select. For  tab panel, click the tab control once to select the tab control and once to select the specific panel. Then use the Name box in the Inspector to give it an object name.

            Now, as TKN mentioned, go to object, specifying the object name that you just gave to the desired panel will select that tab or slide control panel and make it visible.

            • 3. Re: Going to a tab in a script
              Dekade

              I am having some trouble with this.

              FM PRO 10.3 ADV - Firstly, it appears as though I have to click on the tab first to get the panel (tab) selected. If I click on it again then it becomes not selected.

              Secondly, I cannot locate an "Inspector". Nothing found in 'Help'.

              • 4. Re: Going to a tab in a script
                philmodjunk

                The inspector was introduced in FileMaker 12 so you do not have such a thing.

                You'll need to use a different widget that shows the position and name of a selected object. If memory serves, this was Object Info and available from the show sub menu inside of View.

                Any scripted action that puts the focus on something inside the tab panel will bring that tab panel to the front so go to field can also be used if you specify a field inside the tab panel.

                • 5. Re: Going to a tab in a script
                  Dekade

                  Yes, I just discovered that the "Object Info" is where I type in the "Object Name".

                  Upon doing so - and using Script Debugger everything worked fine.

                  Then another problem popped up. Once I was on the panel I could not get "Go To Portal Row" to take me to the first portal row.

                  • 6. Re: Going to a tab in a script
                    Dekade

                    Got it - I think - for now. I had to name the portal as an object. Will proceed on developing the script.

                    • 7. Re: Going to a tab in a script
                      philmodjunk

                      yep, it is best to give a portal an object name and use go to object to put the focus on the portal before using go to portal row as this step has no means to specify which portal it is interacting with.

                      • 8. Re: Going to a tab in a script
                        Dekade

                        TKnTexas and PhilModJunk:

                        I forgot to say thanks for helping me - Thanks.

                        Dekade