5 Replies Latest reply on Feb 1, 2013 8:17 AM by philmodjunk

    Multiple Values in one Field for Find

    BeachedWhale

      Title

      Multiple Values in one Field for Find

      Post

           I know this is a question that has been asked before, but is there really no way to search multiple criteria in one field for a find? Other than doing extend found set that is. Can you write it into a script? I need to create a script that allows a user to input a find request, but possibly for multiple in one field. The amount could vary so I don't know how many extend found sets to put in.

           What's the best way to do this??

        • 1. Re: Multiple Values in one Field for Find
          JimMac

               It sounds like you need to use a OR search.  You want to find .... ie car color field.... Red OR Blue OR White.  thus multiple values of color in the color field.  To do an OR search, you must create a New Search for each Value... before you perform the FIND.

               Jim...

          • 2. Re: Multiple Values in one Field for Find
            philmodjunk

                 If your list of specified criteria is in a global field, your script can

                 enter find mode

                 loop through the list of values using set field to put each criterion in a different find request. (Use new record/Request to create additional requests).

                 Perform the find

            • 3. Re: Multiple Values in one Field for Find
              BeachedWhale

                   I would have to turn it into a global field which shouldn't be hard. But since everything has to be already written in the script, won't the creating additional requests not be in the script? The user would have to create the additional requests, no? And how exactly do I "loop through the list of values using set field to put each criterion in a different find request?

                   Can I do it with a repeating field?

              • 4. Re: Multiple Values in one Field for Find
                JimMac

                     There are two separate parts to your question.

                     1) How to do multiple finds on a single field?  Answer: Search your records with mulitple OR type searches.

                     2) How to input the User selected search criteria in the field and do an OR search?

                     Answer: Many ways....   really depending on the the number of different "criteria"

                     IF...

                     1) User picks just a few criteria... Phil's List approach is fast and easy.

                     or if...

                     2) User can randomly pick a criteria like possible colors of a car and unlimited amount of colors.... Then you may have to create a Table for each search possiblitly and loop through thoser records.

                     Or if....   I hope you get my point... to design your search , decide on the needs of your search and then design the script.

                     Jim...

                • 5. Re: Multiple Values in one Field for Find
                  philmodjunk

                       Yes, the script would create the additional requests within the loop that loops through the selected values.

                       Or the script can perform Enter find mode, specify criteria with set field, extend found set within the loop to find your records. The results should be the same either way as long as your first extend found set starts from an empty found set or your perform a find the first time around.