7 Replies Latest reply on Oct 8, 2012 7:35 AM by philmodjunk

    Portal using data from multiple tables?

    Epa

      Title

      Portal using data from multiple tables?

      Post

           I have a portal that shows the birthdates of each of my contacts.  In each of my contacts records I have a different table/portal that lists their staff members and their birthdates.  Is their any way that I can use 1 portal to show my contacts birthdates AND their staffs birthdates (2 different tables).  I included a pic.  This portal currently only shows my contacts birthdates, I wish I could simply place the staff members fields on top of the contacts fields.

      Snapshot_10%3A7%3A12_1%3A37_PM.png

        • 1. Re: Portal using data from multiple tables?
          davidanders

               A table specifically for birthdays.

               Two portals side by side.

               A Join table that links the two tables specifically for use in the portal.

          • 2. Re: Portal using data from multiple tables?
            EP

                 Thanks.  Unfortunately my solution is already deployed and contains data, so I a trying to add this feature in without losing the data already created.  Is there any other way?

            • 3. Re: Portal using data from multiple tables?
              philmodjunk

                   The methods DavidAnders has suggested do not result in the loss of any data already created. The data stays in place and links to a related table or you use import records to move the data into the new table of birthdays.

              • 4. Re: Portal using data from multiple tables?
                Epa

                     The borthday info on the left belongs to Contacts table.  The birthday info on the right belongs to Office table.  Are you saying that I can have both fit into the portal in the first screenshot I posted?  I think I'd have to add addituonal fields and I would have more than the 3 columns in my screensheet.

                • 5. Re: Portal using data from multiple tables?
                  philmodjunk

                       but adding additional fields do not mean that you have lost any data.

                       What is the relationship between office staff and contacts? (Assuming that I have correctly deduced the two tables that store birthdays...

                  • 6. Re: Portal using data from multiple tables?
                    EP

                         Thanks Phil.  I'm not worried about "lost data" on this anymore.  My concern is with keeping a 3 column portal (see 1st post) to represent all birthdays.  Office Staff is the support staff who works for the contact (Contacts table) and is linked via a number matchfield to the contacts serial #.  I just don't see how I can get Contacts birthdays and Office Staff birthdays to play nice in one 3 column portal.

                    • 7. Re: Portal using data from multiple tables?
                      philmodjunk

                           I take it that your relationship is:

                           Contacts---<Office Staff

                           Contacts::ContactID = Office Staff::ContactID

                           It IS possible to set up that portal, but I do see a problem with your two columns of data: You have a one to many relationship. Therefore for a single birthday on the left, you will have possibly many birthdays on the right.

                           By adding a new occurrence of Contacts and linking it like this:

                           Contacts---<Office Staff>----ContactsBirthday

                           Office Staff::ContactID = ContactsBirthday::ContactID

                           You can put a portal to office staff on your contacts layout and include the birthday field from ContactsBirthday in the portal, but for each member of office staff, you will see the same birthday in the contactsBrithday::Birthday field repeated.

                           Please note that with this arrangment, you add no new fields, no new tables (only a new table occurrence in manage | database | Relationships) and do not need to move any data from it's existing location.