4 Replies Latest reply on Jan 23, 2012 11:18 AM by tech_liaison

    Can you search the entire database?




      I would like to be able to search the entire database, not only the different fields you put into the search... for example... if I wanted to search all files that mentions the word 'Motown' not just the field that may relate to this on a file but to search everyfile which mentions the word 'party band'.


      Thank you!!!

        • 1. Re: Can you search the entire database?

          Hello, youngguns.


          Yes, you can do this. Basically, this involves setting the search term into (typically) a variable, then creating a new Find request for each field in which you want to search. For example:


          Set Variable [ $searchTerm ; {whatever the user entered} ]

          Enter Find Mode [ ]

          Set Field [ {firstField} ; $searchTerm ]

          New Record / Request

          Set Field [ {secondField} ; $searchTerm ]

          New Record / Request

          Set Field [ {thirdField} ; $searchTerm ]

          (repeat as many times as necessary)

          Set Error Capture [ On ]

          Perform Find [ ]

          Set Error Capture [ Off ]

          If [ not Get ( FoundCount ) ]

            Show Custom Dialog [ "Error" ; "Your search found no records" ]

          End If


          Anyway, that's the general idea.You can get fancier with a table that stores the field names, using Set Field By Name instead of Set Field if you like (it makes it easier to maintain and it's more sophisticated), but it's a little more complicated to program.





          • 2. Re: Can you search the entire database?

            Hi Angelica:


            If you are using FileMaker 11, you can use Quick Find, which searches across all fields on the current layout that have not been disabled for Quick Find (all eligible fields are enabled for QF by default unless you specifically disable then in Layout Mode). So if you want to search across all fields in your database, you can create a layout that contains all the fields you want QF to search. The complexity then lies in devising layouts to display search results if your QF search spans multiple tables. If you do not see the QF criteria entry field in the Status Toolbar, then choose the menu, View > Customize Status Toolbar, and drag the QF box to the Status Toolbar. If you want to use QF from a script, then use the Perform Quick Find script step (which is probably what you'll want to do in the scenario we're discussing). Also note that doing any Find across all fields (QF or not), may have performance implications, especially if you are searching related fields from externally referenced files, and/or if the search includes unindexed fields.


            You can learn more about Quick Find in the FMP application help (choose the menu, Help > FileMaker Pro Help):


                 Home > Using FileMaker Pro > Finding, sorting, and replacing data > Finding records


            As for searching files, are you referring to non-FM files in the OS, or are you referring to other FileMaker files that may be open? If you are referring to other FM database files, then QF will search those too as long as the related fields are exposed on the layout that QF is searching. HTH.




            • 3. Re: Can you search the entire database?

              Dave -


              In the immortal words of Homer Simpson ...




              Been doing this in so many previous versions (and on the web), I completely forgot about Quick Find. Thanks.



              • 4. Re: Can you search the entire database?

                No prob Mike. The way you mentioned is definitely still the way to do it on versions < 11.