2 Replies Latest reply on Nov 20, 2015 6:12 AM by sudha

    How to get related records from Table 2 for the omitted records in the Table 1 using scripts

    sudha

      Hi All,

       

      Please give the solution for the below scenario:

       

      1. I have omitted 10 records in Table 1 and now it is showing only 10 records

      2. Need to fetch related records from 'Table 2' for those 10 records using scripts

      3. Finally, it has to be exported at a single shot.

       

      Kindly advise on this.

       

      Thanks

        • 1. Re: How to get related records from Table 2 for the omitted records in the Table 1 using scripts
          TorstenBernhard

          - Table1 and Table2 must have a relationship

          Field in Table1:    Table1::ID

          Field in Table2:    Table2::ID_Table1

           

          - a record in Table two must have the value of the related record in Table1::ID in it's own field Table2::ID_Table1

          (This is the relationship that allows for suing the next step)

           

          - with script step "Go To Related Record" (GTRR), switch to a Table2-based layout and it will show the records related to those records in your Table1 found set. GTTR has options. One notable is that you can switch between showing related records for all records in the Table1 found set or only for the record active at the time of the GTTR call.

           

          Now you can sort, export, print etc.

          • 2. Re: How to get related records from Table 2 for the omitted records in the Table 1 using scripts
            sudha

            Thanks Torsten. That Works!

             

            Please give solution for another scenario:

            Aim is to get relevant information from Table 4 for the different titles present in Table 1

            There are Four tables Table1,Table 2, Table 3 and Table 4

             

            Table 1 is related to Table 2 using Title ID

            Table 2 is related to Table 3 using UserID

            Table 3 is related to Table 4 using UserID

             

            There is no direct relationship established between Table 4 and Table 1 .

             

            In layout(associated table can be any of these tables- Confirm my understanding as these tables occurence are related using different fields),Added Table 1::Title ID,Table 2:: UserID, Table 3::UserID:: Table 4::UserID. In this case, the values of Table 2:: UserID, Table 3::UserID:: Table 4::UserID should comes equal.However, those values seems to be different.


            In SQL , Instead of joining multiple tables, we are adding these fields in the layout. Can you suggest me why those values are not equal even though we have mappings mentioned.


            Thanks.