3 Replies Latest reply on Oct 1, 2009 2:10 PM by billk1radius

    using variables or data field contents as find criteria

    billk1radius

      Title

      using variables or data field contents as find criteria

      Post

      I would like to write a script that uses either the current data in a table field or a variable as the

      criteria for a find request but cannot seem to determine the correct syntax to do this.  Is it possible?

       

      Thanks so much!

      Bill

        • 1. Re: using variables or data field contents as find criteria
          billk1radius
            

          Sorry - here is the information your instructions request:

           

          Filemaker 10.0v3 on Mac OS X 

          Very experienced with computers and IT etc but still learning with Filemaker... at least have portals and relational tables working well now...

           

          I have a database of Sales Orders collected at different events (ex: show1 show2 show3 ...)

          I have created a Report Layout to summarize the sales of each item and total for any given show.

          In order to have the summary calculate I must find the records for a given show.

           

          I would like to simply select a show and have a script perform the find on the selected show.  The show name is in a field in the table but I

          don't know how to set up the find to match that data.

          • 2. Re: using variables or data field contents as find criteria
            mrvodka
              

            Your question is too vague.

             

            You can use a global field to enter in criteria, set a script variable to a field's value, or even just click on the field asnd use FileMaker's native fast find of 'Find Matching Records'

             

            For example:

             

            // using global field where gFindText is the global field and has a value of what you want to find.

            Enter Find Mode []

            Set Field [ YourField; gFindText ]

            Perform Find []

             

             

             

            // using script variable where "Field B" is the field that has the value that you want to find

             

            Set Variable [ $field; Field B ]

            Enter Find Mode []

            Set Field [ YourField; $Field ]

            Perform Find []

             

             

            • 3. Re: using variables or data field contents as find criteria
              billk1radius
                 sorry I was vague but your suggestions lead me to the solution!  Thanks