1 Reply Latest reply on Nov 7, 2010 6:53 PM by davidhead

    Doing a changing find in a script using "omit" mode

    JeffMcGowan

      Summary

      Doing a changing find in a script using "omit" mode

      Product

      FileMaker Pro

      Version

      10

      Operating system version

      mac os 10.6.4

      Description of the issue

      I'm writing a which should do the following - find records in a database which are supposed to be in a warehouse, then take in item numbers one at a time, and remove them from the found set, leaving at the end records which should be in but don't seem to be there.  The structure is -

      Loop
           take item # from user in dialog box, put it in field "Item to find"
           enter find mode
           switch to omit mode (but can't do this)
           set field "item #" to contents of "item to find" field
           perform find (which means omit this record from found set, except of course now it doesn't
      end loop

      I can't get the omit mode set.  I found something in the knowledge base which says with FM 3 there is an "Omit" script step to do this, but it doesn't seem to exist anymore.  I even tried using Perform Applescript to send Command - t to FM, but it won't accept keys from applescripts.  I can't use Edit Find Request since the find is always changing.  HELP!

      Thanks...

        • 1. Re: Doing a changing find in a script using "omit" mode
          davidhead

          Hi Jeff

          The script step you are looking for is called Omit Record. It works to turn on the Omit function in a find request.

          Try a script like this:

          Loop

            Freeze Window

            Enter Find Mode [ ]

            Show Custom Dialog [ Title: "Found It"; Message: "Enter the serial here."; Buttons: “Omit”, “Stop”; Input #1: Data::ID,

          "Serial" ]

            Exit Loop If [ Get ( LastMessageChoice ) = 2 // Cancel ]

            Omit Record

            Constrain Found Set [ ]

            Refresh Window

          End Loop

          Enter Browse Mode

          See how that goes for you. And it doesn't need a global field as you were using.

          TS_Oz, FileMaker Inc.