2 Replies Latest reply on Mar 26, 2015 2:19 PM by FentonJones

    AppleScript "Omit record" not compiling in FMP 12

    louk

      Title

      AppleScript "Omit record" not compiling in FMP 12

      Post

      tell application "FileMaker"

          set numFiles to record count -- AS is compiling other FM commands

          -- Omit -- uncomment this and I get an "expected end of line ..." error

          -- Omit Record -- uncomment this and I get an "expected end of line ..." error

          -- Show omitted only -- uncomment this and I get an "expected end of line ..." error

      endtell

       

      I'm in FMP 12, seems to me I've used these in FMP 9, and I've seen a script using them under FMP 13. What am I doing wrong?

       
      Thanks for the help!
       

        • 1. Re: AppleScript "Omit record" not compiling in FMP 12
          FentonJones

          I've never used that, as I always use FileMaker to go between the records, then call AppleScript. But the above seems to work:

          go to record after current record

          • 2. Re: AppleScript "Omit record" not compiling in FMP 12
            FentonJones

            Actually, the above produces an error, once you get to the last record, and try to go again. The allow will get out of that, saving the records, and telling you (by beeping, could be better :-).

            tellapplication "FileMaker Pro Advanced"

                try

                    go to record after current record

                    -- do stuff

                onerror

                    save

                    beep

                endtry

            endtell

             

            P.S. Oh, I see that you wanted to "Omit" the record. You could call a 1 step FileMaker script (created in the database):

            do script "manual name of script"