5 Replies Latest reply on Aug 5, 2013 4:42 PM by philmodjunk

    Tab control



      Tab control


           Is there a way to limit if a user can go to another tab in a tab panel. I want admins to be able to go to them all but my users to only be able to go into the first tab.

        • 1. Re: Tab control

               one option is to set up a different layout for the two groups of users and then control which one a given user can access.

               Or you can use a script trigger on the tab control that checks a person's account or privilege set name and does not allow the user to select the other tab(s) if they are not authorized to do so.

               The exact script that you'd use depends on whether you are usin FileMaker 11 or 12.

          • 2. Re: Tab control

                 Okay this is what I have so far... I dont know what to say if they are an admin is there an option to allow access or something?

            • 3. Re: Tab control

                   to repeat: The exact script that you'd use depends on whether you are usin FileMaker 11 or 12.

                   What version of FileMaker do you have?

              • 4. Re: Tab control


                • 5. Re: Tab control

                       1) in Layout mode, select each tab panel in turn and give them Object Names by entering a unique name for each in the Name box found on the inspector's Position tab.

                       2) Set an OnTabSwitch script trigger on the tab.

                       3) set it to perform this script:

                       If [ GetValue ( Get ( TriggerTargetTabPanel ) ; 2 ) = "ObjectNameForRestrictedPanelGoesHere" and  Get ( AccountName )  ≠ "admin" ]
                          Show Custom dialog ["YOu do not have access permissions to see this tab"]
                          Exit Script [False]
                       End If

                       The Exit Script [false] step is what keeps the change in tab panels from actually taking place.

                       Note: This will not work in Earlier versions of FileMaker as the get function option and script trigger used are new features in FileMaker 12. A much, much more cumbersome method with the OnObjectModify trigger has to be used to achieve the same result.