4 Replies Latest reply on Oct 23, 2013 10:07 AM by mcurley

    Tab Panel Navigation

    benniemc

      OK, I give up. Tried everything...

       

      FMPro 12...

      User selects a tab panel on the current record with the cursor.

      Script determines if navigation to that tab panel is allowed.

      If allowed... focus is shifted to that tab panel.

      If not... user is returned to current tab panel. <--- This is the part that doesn't work.

       

      I've tried GetValue (Get (TriggerTargetTabPanel) ; 2)... The object has a name.

      I've tried GetValue (Get (TriggerCurrentTabPanel) ; 2)... nope.

       

      Sounds simple. Guess I'm missing something.

       

      HELP... if you can.

        • 1. Re: Tab Panel Navigation
          erolst

          Just so we're on the same page here: you need to trigger your script with the OnTabSwitch event.

           

          Then within the script check the target panel, and if necessary –  e.g. GetValue ( Get (TriggerTargetTabPanel ) ; 2 ) = "verboten!" – exit the script with a result of 0 (or the keyword False, without quotes), which will cancel the tab switch and leave the user where they are.

          • 2. Re: Tab Panel Navigation
            IT_User

            So I'm guessing you are using the script trigger onTabSwitch, which will run the script before it switches tabs, as far as I know.

             

            Then all you would need to do is:

            If Allowed:

              Go to new tab panel

            Else not allowed:

              Exit Script[False] //That will leave you on the current panel

             

            Let me know if I am misunderstanding or leaving something out.

            1 of 1 people found this helpful
            • 3. Re: Tab Panel Navigation
              benniemc

              Thanks for your comments. My onTabSwitch script attempted to allow the user to navigate to a specific target panel. Although I had used the script result "false" upon exit, the script could be called from any tab panel. Never could find a "Go To TabPanel" script step, but exiting seems to work fine. Thanks again.

              • 4. Re: Tab Panel Navigation
                mcurley

                Not your original question, but you can give each tab panel an object name, then use the Go to Object: <Object Name> script step. That gives you your Go to TabPanel functionality.