3 Replies Latest reply on Mar 24, 2009 7:56 AM by Orlando

    Defaulting to tab 1 when moving between records

    jtoynbee

      Title

      Defaulting to tab 1 when moving between records

      Post

      I have a database for some events. Contact details of orgniser etc in main bit and then a seperate tab for each event, up to 12, most events only have 1 event and therefore only use one tab. Whichever tab you were using in one record, i.e. fourth tab, says foremost when you switch to the next. I want it to default to Tab 1 (labelled Event 1) when you move forward or back a record. How do I go about this?

       

      Thanks

       

      Jeremy

        • 1. Re: Defaulting to tab 1 when moving between records
          Orlando
            

          Hi Jeremy and welcome to the forum,

           

          Are you using FileMaker Pro 10? If so you could give your first tab an object name, and then using the Script Triggers you run a script OnLayoutLoad that selects the first tab.

           

          So the first thing to do is give the default tab an object name. You do this by clicking on your first tab, when it is the front tab, and a highlight will show around the tab, and then using the Object Info Palette, View > Object Info, give it an object name, so lets say "Default" for now.

           

          Next you create a new script:

           

          TabSelect --
           

          Go to Object [ "Default" ] 

           

          Now we have all the components setup we need to setup the script triggers, on you layout go into Layout Mode and then go: Layout > Layout Setup... 

          Click on the Script Trigger tab and then select OnLayoutLoad.

          When the Specify Script dialog appears select your new script TabSelect and click OK and OK again.

          Now go back into Browse mode and see if it works.

           

          Not sure if there is an easy way to do this in anything pre 10, but you may be able to use script trigger plug-ins to do the same in 9. 

           

          Hope this helps.

           


          • 2. Re: Defaulting to tab 1 when moving between records
            jtoynbee
              

            Dear Orlando

             

            Thanks for the welcome and the excellent advice. I am on FileMaker Pro 10, so all's well. Did as instructed, but set the trigger OnRecordLoad, so that it would do so each time we switch between records. All works fine.

             

            Thanks again

             

            Jeremy

            • 3. Re: Defaulting to tab 1 when moving between records
              Orlando
                

              No worries Jeremy, glad I could help.

               

              You are quite right, it should be OnRecordLoad not OnLayoutLoad.