5 Replies Latest reply on May 28, 2009 10:14 AM by philmodjunk

    Finding data from multiple fields

    craig5005

      Title

      Finding data from multiple fields

      Post

      I'm not sure if this is possible or not, but I figured I would open it up to the forum for suggestions.

       

      I have a find layout, and I would like a single entry to search multiple fields.

      For example...

       

      User inputs "hammer"

      And it searches both the "general description" and "detailed description" fields.

       

      Is this possible?

       

      Thanks

      Craig 

        • 1. Re: Finding data from multiple fields
          mrvodka
            

          If you have a global field to enter in your "hammer" (gEntry), then you can script it to search both fields.

           

          Enter Find Mode []

          Set Field [ general description; gEntry ]

          New Request

          Set Field [ detailed description; gEntry ]

          Perform Find []

          • 2. Re: Finding data from multiple fields
            craig5005
              

            Not sure if that will work or not, I don't want to set/change the two fields.

             

             

            For example, someone might be looking for a specific saw.  They might search "saw", which all of our many types of saws are listed under, but they may also search "hydraulic concrete saw", which is listed only under "detailed description" field.  If the find is set up for searching the "general desc" field, then "hydraulic concrete saw" wouldn't work.  However, if the find was searching both the general and detailed desc, this "hydraulic concrete saw" search would work.

            • 3. Re: Finding data from multiple fields
              philmodjunk
                

              Try Mr. Vodka's example. It should work for you.

               

              The set fields are operating while in find mode so no data is actually being changed. The new request step puts the find criteria in two different request instances. The logic works as an "OR" operation. If "saw" is in first field OR the second field, it will be found.

              • 4. Re: Finding data from multiple fields
                craig5005
                  

                That definitely worked!  Thanks for the solution.

                 

                I have one quick follow up question though.

                 

                When I open the layout, it lists all my records in a list.  Is there a way to not show any records unless I perform a find?

                The reason is, these finds will be performed on handhelds through IWP, and therefore loading 1000's of records will waste time.

                 

                Craig 

                • 5. Re: Finding data from multiple fields
                  philmodjunk
                    

                  The following script will generate an empty found set and thus display no records:

                   

                  Go To Layout [layout where you want to show zero records]

                  Show all records

                  Show omitted Only