3 Replies Latest reply on Jun 17, 2010 2:49 PM by woodman35

    FMP Script wont run properly - Why?

    woodman35

      Title

      FMP Script wont run properly - Why?

      Post

      I have two scripts which I can run successfully in succession - but If I place a command at the end of the 1st script to run the 2nd script, it doesn't work properly.
      Also- If I place all the commands in the 2nd script at the end of the first script , also no go:

      1st:
      Go to layout ["Invoices"(main table)}
      Show all records
      Enter Find Mode [] ! here i have to enter find !criteria manually
      Sort Records

      2nd:
      Go To Layout ["Budget Label" (photo log master}]
      !this layout is a report with summaries
      Sort Records [restore; No dialog]
      Enter Preview Mode []

      If I run these commands as one script
      FMP tries to sort all 6000 records in the "Invoices" layout instead of Entering Find mode, which is strange to me because the first 4 commands in this combined script are the same either way.

      Thanks for any help
      JW
      Enter Preview Mode []









        • 1. Re: FMP Script wont run properly - Why?
          bearhart74_1

           


          woodman35 wrote:

          I have two scripts which I can run successfully in succession - but If I place a command at the end of the 1st script to run the 2nd script, it doesn't work properly.
          Also- If I place all the commands in the 2nd script at the end of the first script , also no go:

          1st:
          Go to layout ["Invoices"(main table)}
          Show all records
          Enter Find Mode [] ! here i have to enter find !criteria manually

           

          Insert a perform find here so the find actually gets executed and you get out of find mode. 

           
          Sort Records

          2nd:
          Go To Layout ["Budget Label" (photo log master}]
          !this layout is a report with summaries
          Sort Records [restore; No dialog]
          Enter Preview Mode []

          If I run these commands as one script
          FMP tries to sort all 6000 records in the "Invoices" layout instead of Entering Find mode, which is strange to me because the first 4 commands in this combined script are the same either way.

          Thanks for any help
          JW
          Enter Preview Mode []


           










          • 2. Re: FMP Script wont run properly - Why?
            philmodjunk

            In all cases, was the Enter Find Mode step actually

             

            Enter Find Mode [Pause]?

             

            You need the pause option if you want the script to halt and wait for a user to enter find criteria. It sounds like one or more of the variations of this script didn't pause for user input and may have in fact used a Perform Find step to find the records before you could enter criteria for the find.

            • 3. Re: FMP Script wont run properly - Why?
              woodman35

              Thanks, Both of you were correct.

              I've gotten quite rusty in FMP Scripting.

               

              JW