4 Replies Latest reply on Feb 22, 2011 4:10 PM by philmodjunk

    Filter from list of criteria

    ChristopherLaw

      Title

      Filter from list of criteria

      Post

      Afternoon,

      I am using filemaker to track shots for VFX work and regularly must check 10 or so shots from a list containing 1000. What I would love to be able to do is paste a list of Shot Numbers and search for every line in the Table View in Brouse mode. I do this quite often, so creating a new table and importing or finding with multiple lines is inefficient.

      Is there a way to have a search box that contains multiple lines and search for each record that matches the shots.

      Thanks,

      Blaw

        • 1. Re: Filter from list of criteria
          philmodjunk

          THere are ways to create a list of check boxes where you click check boxes to build a list of criteria on which you want to search.

          A script can be used to stream line your search whether you use such a check box method or just "paste a list of shot numbers" into a field.

          Define a global text field into which you enter your list of shot numbers. This field must have global storage enabled for this script to work:

          Enter Find Mode[]
          If [ Not IsEmpty ( YourTable::globalShotNumberListField ) ]
             Loop
                Set Variable [$I ; value: $I + 1 ]
                Set Field [ YourTable::ShotNumberField ; getvalue ( YourTable::globalShotNumberListField ; $I )]
                Exit Loop If [$I = valueCount ( YourTable::globalShotNumberListField ) ]
                New Record/Request
             End Loop
             Set Error capture [on]
             Perform Find[]
          End If

          With this script, you can enter/select/paste shot numbers in YourTable::globalShotNumberListField, then run the above script to find all the records with a shot number that's on this list.

          • 2. Re: Filter from list of criteria
            philmodjunk

            After I posted, I had another idea:

            If you have a field of type number that records the shot numbers for your records, you can also use a number range in a find.

            To find all shots from 223 to 325, you can enter find mode and enter 223...325 into the shot number field--something that's easy to do in a manual find and also easy to do in a script.

            • 3. Re: Filter from list of criteria
              ChristopherLaw

              I played with this script a little bit. I think the issue starts when I copy a list from excel or somewhere else and need to paste it into filemaker so I can find the matching data for that record. I can't paste multiple lines into the search field so that the data is pulled up for everything (or don't know how)

              Thoughts?

              • 4. Re: Filter from list of criteria
                philmodjunk

                Probably can't as the copied data from excel likely has a more complex structure than a simple list of values separated by returns. That's one reason why I suggested doing searches with a range of values. You can also do searches with inequality operators.