2 Replies Latest reply on Mar 8, 2013 3:18 PM by turbojesse

    Using Get(TriggerCurrentTabPanel) and Get(TriggerTargetTabPanel)



      Using Get(TriggerCurrentTabPanel) and Get(TriggerTargetTabPanel)


      Could someone please explain how these two functions (FMPa 12) are supposed to work.  I want to use it to run trigger scripts when changing TABs (the OnTabSwitch trigger selection).  I have created object names for each TAB, but I can't get the Data Viewer to tell me anything!

      Perhaps a simple example?


        • 1. Re: Using Get(TriggerCurrentTabPanel) and Get(TriggerTargetTabPanel)

          Select the Tab control while in layout mode and set it up with the OnTabSwitch script trigger. Use this trigger to perform your script that uses the two get functions to do what you want here.

          Say you have two tab panels with object names (Created in the name box in the inspector), of "First"  and "second".

          If you, or a script changes the focus from "First" to "second", bringing the second panel to the front,

          Get(TriggerCurrentTabPanel) will return "First"


          Get(TriggerTargetTabPanel) will return "second".

          Thus, you can set up If script steps in the script that use these two functions to determine what tab was current before the focus changed and what tab will become current if the script allows the tab switch to proceed. (To keep the tab switch from happening, use Exit Script [false].

          • 2. Re: Using Get(TriggerCurrentTabPanel) and Get(TriggerTargetTabPanel)


                 It seems straight forward but something seems to be broke on my end. Here's a screen shot of my Dataviewer with 2 simple tabs and switching between them. They are named "A" and "B". The Dataviewer shows that the two "Get" functions for the Tab Panel Script trigger do not return the second value which is supposed to be the Tab Name.


                 I've tried and tried but cannot get this to work on several different machines. Any Ideas? Anyone?



                 FIlemaker Pro 12 Advanced

                 MacOS X 10.8