2 Replies Latest reply on Jul 6, 2015 5:54 AM by Atcha

    Two one-to-many links in two tables

    Atcha

      Title

      Two one-to-many links in two tables

      Post

      Hi,

      My database skills are a little rusty so I am hoping one of you can point me in the right direction. I have two tables A & B and want to establish two one-to-many links between them using the primary key of table 1 for one link and the primary key of table 2 for the other. I then would like to design two forms, one based on table A with a portal listing the corresponding records from table B, and one based on table B listing the corresponding records from table A. How do I go about this?

        • 1. Re: Two one-to-many links in two tables
          philmodjunk

          Create two Found Sets to PDF with unique file names boxes for each table in Manage | Database | Relationships. You'll have two to start that are created when you define the table so, for example, find the table occurrence for A, select it an click the duplicate button ( two green plus signs ) to get A 2. (It's possible to rename these boxes to have more descriptive names.)

          Once you have A, A 2, B, B2. You can set up your two relationships, one between A and B and one between A 2 and B 2. Set up a layout based on A and give it a portal to B (assuming a one to many from A to B). Create a new layout and base it on B 2. Give it a portal to B 2. (Assuming a one to many relationship from B 2 to A 2.)

          • 2. Re: Two one-to-many links in two tables
            Atcha

            Thanks, that is actually something I tried since I remembered that from designing a database in the late 1980s when they were called virtual tables in the program I was using (if memory serves me right). However, I got an error message, so I must have done something wrong. I may actually have tried to mix the fields from B1 with those of B2. I will give it another shot and thanks again.