1 Reply Latest reply on Sep 4, 2012 4:02 PM by philmodjunk

    Probably simple: Search multiple criteria

    KateGolden

      Title

      Probably simple: Search multiple criteria

      Post

      Hi - I'm new to Filemaker and can't figure out how to create a search that includes multiple criteria for the same field. For example, to find all the records in my table where FIELD1 = {602 OR 605 OR 613 OR 621 OR ... }.

      I get how to do it using the "find" box and then choosing "extend found set" -- but I cannot figure out how to do it all at once, and I have many criteria to add that would make this too cumbersome and error-prone.

      I see two options: 1. Script: The script editor appears offer a way to write SQL statements, but I can't find any examples that show me how that would work. (Also, while I understand the SQL syntax in theory, I've never written a query.)

      2: Saved find: I read the instructions here, but I can't figure out how to apply them to my situation. http://help.filemaker.com/app/answers/detail/a_id/7052

      I have Filemaker Pro 11.

      Can someone walk me through this?

      Very grateful for any help.

        • 1. Re: Probably simple: Search multiple criteria
          philmodjunk

          Extend found set is a viable option--especially via a script that can loop through your list of values and extend the found set for each.

          You can also use this method--either manually or in a script:

          Enter find mode
          Enter 602 in field 1
          Create a new request (See new request in requests menu)
          Enter 605 in field 1
          Create a new request
          Repeat for each value in your list....

          Perform Find

          Either approach can be scripted if you set up a global field where the user enters the values for the search as a list. The script then loops through the list either extending the found set or creating a new request for each listed value to produce the desired found set.

          And note that you can also use a range of values as your search criteria. If you entered 602...621 into field 1 as your search criteria, FileMaker will find all values from 602 to 621.