4 Replies Latest reply on Mar 16, 2009 8:13 PM by PR

    Expanding a find based on the results of a find

    PR

      Title

      Expanding a find based on the results of a find

      Post

      I have a file with fields "ID" "data1" and "data2". First I would like to find all records containting "Louis" in field "data1", so I go to find mode and get a list that might look
      like this:

      ID        data1            data2

      F001      Louis XIV        aaa
      G123      Louis Jones      bbb
      A088      St. Louis        ccc

      Now I would like a list of all records which have these ID's, that is, all records which
      have ID's F001, G123, or A088. Is there any way to do this without typing in each individual
      ID in a new search?






        • 1. Re: Expanding a find based on the results of a find
          philmodjunk
            

          Do you want to achieve this manually or through a script? There are a number of possibilities depending on the structure of your database and what you want to do.

           

          For example:

           

          If you have a self join relationship linking ID to ID. You can script this in two parts:

           

          1) script the necessary steps to "find louis"

          2) Use Go to related record to pull up all records related to the found set by their ID numbers. (use the show only related records, match records in found set options.)

          • 2. Re: Expanding a find based on the results of a find
            PR
              

            Hi - thanks for your reply -

             

            Hmm - I must have missed something. From Edit>Manage Database>Relationships I established a relationship between the ID field in "MyTable" and itself in a duplicate table "MyTable 2". Then I made a script called "NewScript" with one command in it - Go to Related Record[Show only related records:Match found set; From table: "MyTable"; Using layout: <Current Layout>; New window]

            Then I manually found the "Louis" subset. Then I went to Scripts > NewScript. The resulting new window contained the same data, no new records were added. I am very sure there are new records with matching ID's to be added.

            • 3. Re: Expanding a find based on the results of a find
              philmodjunk
                 What do you get when you use "my table 2" instead of "my table" in your Go to related record step?
              • 4. Re: Expanding a find based on the results of a find
                PR
                   Wow! that worked! Thanks very much for your help.