1 2 Previous Next 18 Replies Latest reply on Feb 20, 2009 9:50 AM by comment_1

    How to perform a "Global Search" ?

    ninja

      Title

      How to perform a "Global Search" ?

      Post

      Howdy all,

       

      I have a Client Tracking and Data Mining Dbase with >300 fields and I would like to do something I never foresaw.

       

      How do I do a find for the text "Dr." when it might occur in any of the 300+ fields? 

       

      I can run a script to extend the found set and move the search term around, but not 300 times!  Surely there must be a better way...who knows it?

       

      Thanks in advance!

        • 1. Re: How to perform a "Global Search" ?
          TSGal

          Ninja:

           

          Thank you for your post.

           

          Use the script step:

           

          Perform Find/Replace []

           

          When you click on "Specify..." the dialog box has many parts.

           

          The pop-up assigned to "Perform:" should be set to "Find Next"

           

          In the "Find what:" section, you can enter static information or a variable.

           

          For "Direction:", select Forward. 

           

          At the bottom, set it to search across all records and all fields.

           

          Now, when you execute this script step, it will find the next occurrence of what you are trying to find across all records and all fields.  Therefore, you don't have to specify the 300+ fields.  Does this make sense?

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: How to perform a "Global Search" ?
            raybaudi
              

            Hi Ninja

             

             

            the TSGal approach do not give a found set.

             

            I would create a calculated field using the List ( ) function and than do a Perform Find on that new field.

            • 3. Re: How to perform a "Global Search" ?
              ninja
                

              Thank you both,

               

              I haven't tried either yet, but raybaudi brings up a good point re: found sets.  I would need a found set of all records that have "Dr. " somewhere in them.

               

              How would I use the List() function to get me where I'm going?  (This is me being lazy rather than figure it out on my own, it's a busy day today...)

              • 4. Re: How to perform a "Global Search" ?
                TSGal

                raybaudi:

                 

                Thank you for the correction.  My example will NOT create a found set.  I frequently work with two or more postings at a time, and my answer used information from another post.  Sorry for the confusion.

                 

                The answer by "raybaudi" is an excellent option. 

                 

                TSGal

                FileMaker, Inc.

                • 5. Re: How to perform a "Global Search" ?
                  TSGal

                  Ninja:

                   

                  The List () function allows you to list items.  In this case, your calculation formula would be: 

                   

                  List ( <field1> ; <field2> ; <field3> ; ... ; <fieldN> )

                   

                  TSGal

                  FileMaker, Inc. 

                  • 6. Re: How to perform a "Global Search" ?
                    raybaudi
                      

                    TSGal wrote:

                     

                    The answer by "raybaudi" is an excellent option. 

                     


                    Thank you, TSGal.

                     

                    BTW: I didn't want to correct you but only to point out that the result of your solution isn't a found set.


                    • 7. Re: How to perform a "Global Search" ?
                      raybaudi
                        

                      TSGal wrote:

                      Ninja:

                       

                      The List () function allows you to list items.  In this case, your calculation formula would be: 

                       

                      List ( <field1> ; <field2> ; <field3> ; ... ; <fieldN> )

                       


                      ... then, doing a FIND in that field will create a found set of all the records where one ( or more ) of those fields contain a given string.


                      • 8. Re: How to perform a "Global Search" ?
                        TSGal

                        raybaudi:

                         

                        BTW: I didn't want to correct you but only to point out that the result of your solution isn't a found set.

                         

                        No, you should correct me!  I did not read the post correctly, so the information I posted was incorrect.  I only want to make sure the customer receives the correct information.  :-)

                         

                        TSGal

                        FileMaker, Inc.

                        • 9. Re: How to perform a "Global Search" ?
                          ninja
                            

                          OK you kids, cut it out back there.  You're both excellent and you're both friendly and you're both not right 100% of the time...now play nice or I'll have to separate you :p

                           

                          (yes, this is joking and mildly sarcastic in case there was any doubt)

                           

                          Thank you both for your help...I'll let you know if it works out well.

                          • 10. Re: How to perform a "Global Search" ?
                            comment_1
                               There is a way to quickly create 300 identical requests for 300 different fields (hint: Perform Find/Replace [] works in Find mode, too).

                            However, if you need to look for the same thing in 300 fields, perhaps you should re-evalute your data structure instead.
                            • 11. Re: How to perform a "Global Search" ?
                              ninja
                                

                              Comment,

                               

                              I agree on the re-evaluate.  This is one of those cases of trying to get a client to decide what they want before the work starts...never an easy task and it ends up in places like this.

                               

                              I've been trying a looped find with Extend FoundSet.  The problem here is that when you reenter find mode, it always starts at field 1, so 'go to next field' is fairly useless.  I'm toying with capturing the field name, going to the fieldname stored and then going to next field...but I haven't had time to toy with this again yet.  I'll post it when it finally works.

                               

                              Please feel free to expand on the Find/replace that you mention.  My little brain isn't connecting it's utility for this situation...another hint please?

                              • 12. Re: How to perform a "Global Search" ?
                                comment_1
                                   Simply enter find mode, restoring 300 requests for <anything>. Then use Find/Replace to replace <anything> with the actual criteria.

                                Another way would be to loop through a list of field names (or a list of named field objects, if your version is below 10). For each item on the list, create a request and set the field by name (or go to the object and use Set Field without specifying the target field).
                                • 13. Re: How to perform a "Global Search" ?
                                  ninja
                                    

                                  Thanks comment,

                                   

                                  But that's the nightmare script I'm trying to avoid.

                                   

                                  I'm thinking about how to loop to "next field" in a find so I don't have to write the nightmare script.  I think I know how, I just haven't gotten to it yet.

                                   

                                  Keep the ideas comin...

                                  • 14. Re: How to perform a "Global Search" ?
                                    comment_1
                                       Perhaps I am missing something something, because I don't see where the nightmare is. Inconvenience, yes - but nightmare?. Which version are we talking about here?
                                    1 2 Previous Next