4 Replies Latest reply on Jun 10, 2009 5:18 PM by annacaltech

    finding several records with ID#

    annacaltech

      Title

      finding several records with ID#

      Post

      Hi,

       

      Is it possible to create a search function that gives me as set of records like this:

       

      Each record has a ID# ranging from MB100-MB9000. I would like to find MB1374, MB4589, MB329, MB5431 and create a found set with them. Is this possible?

       

      thanks,

      anna 

        • 1. Re: finding several records with ID#
          philmodjunk
            

          The simplest approach is to create a separate find request for each ID code, then click find. You can do this by hand or in a script.

          1. Enter find mode.
          2. Enter your first ID code
          3. Choose Add new request from the requests menu
          4. Enter your second ID code
          5. Repeat steps 3 & 4 for each additional id code.
          6. Perform the find
          • 2. Re: finding several records with ID#
            annacaltech
              

            ok, so I am trying to write a script for this:

             

            Set Variable[$search_1; Value:ID#::search_1] 

            Set Variable[$search_2; Value:ID#::search_2]  

            Set Variable[$search_3; Value:ID#::search_3] 

            Set Variable[$search_4; Value:ID#::search_4] 

            Set Variable[$search_5; Value:ID#::search_5] 

            Set Variable[$search_6; Value:ID#::search_6] 

            Set Variable[$search_7; Value:ID#::search_7] 

            Set Variable[$search_8; Value:ID#::search_8] 

            Set Variable[$search_9; Value:ID#::search_9] 

            Set Variable[$search_10; Value:ID#::search_10] 

            Enter Find Mode[]

            Set Field [ID#;;id#_ID;$search_1]

            Perform Find[]

            Extend Found Set [Restore] 

             

             

            and Extend Found Set [Restore] is set to ID#::id#_ID:[$search_2]

             

             

            but this does not work.. It says that "No records match this set of find requests." and the ID# field is filled with $search_2.

             

            What am I doing wrong?

             

            thanks,

            anna 

             

            • 3. Re: finding several records with ID#
              philmodjunk
                

              Instead:

               

              Set Variable[$search_1; Value:ID#::search_1] 

              Set Variable[$search_2; Value:ID#::search_2]  

              Set Variable[$search_3; Value:ID#::search_3] 

              Set Variable[$search_4; Value:ID#::search_4] 

              Set Variable[$search_5; Value:ID#::search_5] 

              Set Variable[$search_6; Value:ID#::search_6] 

              Set Variable[$search_7; Value:ID#::search_7] 

              Set Variable[$search_8; Value:ID#::search_8] 

              Set Variable[$search_9; Value:ID#::search_9] 

              Set Variable[$search_10; Value:ID#::search_10] 

              Enter Find Mode[]

              Set Field [ID#;;id#_ID;$search_1]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_2]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_3]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_4]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_5]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_6]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_7]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_8]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_9]

              New Record/Request

              Set Field [ID#;;id#_ID;$search_10]

              Set Error capture[on]

              Perform Find[]

              Set Error capture [off]

               

              If you make your search fields global fields, you can eliminate the variables and just refer directly to the global fields while in find mode.

               

              Set Field [ID#;;id#_ID; ID#::search_1]

               

              for example will work in find mode if the search_1 field is global.

              • 4. Re: finding several records with ID#
                annacaltech
                  

                thanks,

                 

                works perfect!

                anna