6 Replies Latest reply on Jun 8, 2017 2:31 PM by HB

    Repeating fields and Perform Find

    HB

      In the Perform Find Edit Request Dialog Box, why does it allow you to specify a number for the field repetition???  Seems to me this doesn't change anything as the find searches all the repetitions at once.

       

      I am trying to find all the records having x value in the second repetition only.

       

      ( I know we shouldn't be using repetitions but this database that has been used for years does and isn't worth converting.)

        • 1. Re: Repeating fields and Perform Find
          siplus

          Create a new layout, put just the second repetition on it, enable quickfind if not already enabled, do a quickfind.

           

          Only the second rep will be searched.

          • 2. Re: Repeating fields and Perform Find
            HB

            Thank You, Siplus

             

            I will keep that in mind - I did just do a     loop - if     series for each repeating field and got my answer however I am still wondering why that little box is still there if it doesn't do anything.

            • 3. Re: Repeating fields and Perform Find
              beverly

              How are you getting ONLY the 2nd rep searched? I've tried every which way and even followed your instructions.

               

              The Repeating field is an OR search and every rep is searched (even if displayed on layout as a single rep, like "2 to 2").

               

              All records with any match (any rep) to the quick find (or manual find or scripted find) is a 'found record'.

               

              Any clues of what might be happening?

              Beverly

              1 of 1 people found this helpful
              • 4. Re: Repeating fields and Perform Find
                user19752

                why that little box is still there if it doesn't do anything.

                It doesn't change the result of found set as you see, but change the search criteria.

                If there is a repetition field [2..2] on a layout, someone may want to set the box as 2. The criteria can be watched using "Modify Last Find".

                • 5. Re: Repeating fields and Perform Find
                  user19752

                  I am trying to find all the records having x value in the second repetition only.

                  SQL can find repetition individually.

                  SELECT *

                  FROM table

                  WHERE field[2]='x'

                  To make found set, you can get list of primary key using SQL, then go to related records or something.

                  • 6. Re: Repeating fields and Perform Find
                    HB

                    re SQL

                     

                    Thanks - first time for me using SQL  Probably could loop this too but it worked

                     

                    I used:

                     

                    (ExecuteSQL ( "SELECT sum(\"Extra Price Extended\"[1])  FROM Wrk_Ordr WHERE Wrk_Ordr.Extra[1]like'GRPH-Print%'"; ""; ""))

                    +

                    (ExecuteSQL ( "SELECT sum(\"Extra Price Extended\"[2])  FROM Wrk_Ordr WHERE Wrk_Ordr.Extra[2]like'GRPH-Print%'"; ""; ""))

                    +

                    (ExecuteSQL ( "SELECT sum(\"Extra Price Extended\"[3])  FROM Wrk_Ordr WHERE Wrk_Ordr.Extra[3]like'GRPH-Print%'"; ""; ""))

                    +

                    (ExecuteSQL ( "SELECT sum(\"Extra Price Extended\"[4])  FROM Wrk_Ordr WHERE Wrk_Ordr.Extra[4]like'GRPH-Print%'"; ""; ""))