2 Replies Latest reply on Oct 19, 2013 2:49 PM by StanMillar

    Conditional format of active tab panel


      Hi all


      Fm12 on Mac OSX 10.8.


      I want to conditionally format the active tab panel and have the formatting change as each different tab panel is made active.


      I have a script that updates the found set when changing from the panel marked "current" to the panel marked "complete" by using the names I have assigned to each tab panel object and I am thinking that I can use the same script to change something so that the conditional formatting formula triggers as each panel is made active but I can't get it to work on just the newly active panel. Either they all change or none do.


      I found some hints in the archives but not enough to set me straight.


      Any help will be appreciated.





        • 1. Re: Conditional format of active tab panel

          You probably are looking for something with the Get ( TriggerTargetTabPanel ) and Get ( TriggerCurrentTabPanel ) functions.  You will also need to click on the tab panel and then go up to and pull down to "Set Script Triggers" and set a "OnTabSwitch" trigger to fire when you are clicking on scripts.  You will run a script that will first determine the starting tab you are on and the target tab you are going to.  You can then set a conditional to be turned on if the target panel is to be highlighted.  So,



          Set Variable [ $Start ; Get ( TriggerCurrentTabPanel ) ]

          Set Variable [ $$ConditionalGlobalVariable ; Get ( TriggerTargetTabPanel ) ]



          Then you can have a conditional background text field behind the tab label that changes colors based on the value of $$ConditionalGlobalVariable. 


          Also note when writing a script, if you want there to be conditions that keeps someone from clicking on a tab, you have to Exit the script with a value such as Exit[0].  That will keep the target tab from being selected. So if you wanted someone clicking on tab 2 that belongs to a privilege group called "Not Allowed" (just a made up name), then the following if statement will keep that tab 2 panel from going active if they don't pass the If test. 


               If [ $$ConditionalGlobaVariable = 2 and Get ( AccountPrivilegeSetName ) = "Not Allowed" ]

                    Exit Script [Result; 0]

               End If

          1 of 1 people found this helpful
          • 2. Re: Conditional format of active tab panel

            Thanks Taylor.


            I have been trying to use the GetLayoutObjectAttribute ( objectName ; "isFrontTabPanel") function without success but I am probably missing something basic. I will give your suggestions a try.


            Thanks again.