2 Replies Latest reply on Sep 28, 2009 9:53 AM by comment_1

    Global Search Fxn

    wmixter

      Title

      Global Search Fxn

      Post

      When using the documents library template, I've noticed that the Find capabilities allow one to search any field on a record, but the results are limited to matches in that specific field. Is there any way to create a search function that will scan all fields in all documents for matching words, etc.? Thanks!

        • 1. Re: Global Search Fxn
          philmodjunk
            

          You can script this:

           

          User enters search text into a global text field. (select this option in Storage tab in field options for the given field.)

           

          Your script then, might look like this:

           

          Enter find mode []

          Set field [Yourtable::field1 ; Yourtable::gSearchTextField]

          New Record/Request

          Set field [Yourtable::field2 ; Yourtable::gSearchTextField]

          New Record/Request

          Set field [Yourtable::field3 ; Yourtable::gSearchTextField]

          New Record/Request

          Set field [Yourtable::field4 ; Yourtable::gSearchTextField]

          #continue this pattern for each field you want to search.

           

          Set Error capture [on]

          Perform find []

          Set Error capture [off]

           

          To use this script, place gSearchTextField on a layout and place a button next to it set up to perform the above script. The new Record/Request step sets this up so that you find records containing the search text in field 1 OR field 2 OR field 3...

           

          You can also do this type of search manually, though it quickly gets pretty tedious if your searching a lot of different fields.