4 Replies Latest reply on May 26, 2009 5:21 PM by Felicity

    Scripts

    Felicity

      Title

      Scripts

      Post

      Hello, 

       

      I am trying to create a report/layout that sorts by state. I cannot get the report to end at the top of the first page. What function do I need to use?

       

      Thank you,

       

      Felicity

       

      Enter Browse Mode 

      Go to Layout [ “Contacts by State 2” (Contact Management) ] 

      Sort Records [ Specified Sort Order: Contact Management::State_Province1; ascending ] 

      [ Restore; No dialog ] 

      #Go to Preview mode for earlier versions which do not support summary reports in Browse mode. 

      If [ GetAsNumber ( Get ( ApplicationVersion ) ) < 10 ] 

      Enter Preview Mode 

      Enter Browse Mode 

      Go to Layout [ original layout ] 

      End If 

       

        • 1. Re: Scripts
          Orlando
            

          Hi Felicity and welcome to the forum.

           

          After the Sort Script Step insert an additional step Go to Record/Request/Page [ First ] and that will get you to the top of the page.

           

          I hope this helps

          • 2. Re: Scripts
            Felicity
              

            thanks Orlando. You might also be able to help me with another problem. If I am open a layout, it doesn't perform the script automatically. i have to go into scripts and chose the relevant one.

             

            The script below is a an example.

             

            Thanks again for your help.

             

            Cheers,

            Felicity 

            • 3. Re: Scripts
              philmodjunk
                

              If you are using FMP 10, you can set a layout script trigger (open Layout setup.. while in layout mode) to perform the script "on Layout Load".

               

              Be careful of any other scripts you have that may go to this layout, as they will automatically trip this same script trigger when the script performs.

              • 4. Re: Scripts
                Felicity
                  

                fabulous! thank you very much.

                 

                Felicity