1 Reply Latest reply on Jul 4, 2009 4:49 AM by comment_1

    One Table - more contacts in the same layout

    enniorancan

      Title

      One Table - more contacts in the same layout

      Post

      Hi everybody, I'm sorry for my English but I'm Italian.

       

      I have two tables:


      TAB_CONTACTS
      tab_contacts_id
      tab_contacts_name
      tab_contacts_surname
      tab_contacts_kind_contacts

      TAB_FILE
      rel_tab_contacts_id

      tab_file_id 

      tab_file_man
      tab_file_woman
      tab_file_body_letter

       

      I need to write a letter where two different contacts from the same table (TAB_CONTACTS) are in the same paragraph.

      The letter is:

      Hi Marco Rossi, I'm very glad to annunce you that Anna Bianchi will ships the book tomorrow.

       

      In merge text layout I could write: 

      Hi <<tab_file_man>>, I'm very glad to annunce you that <<tab_file_woman>> will ships the book tomorrow.

       

      Off course it does't work,  becouse the only joint is "rel_tab_contacts_id AND tab_contacts_id. But I don't know wow to solve the problem.

       

      Anybody have an idea?

       

      Thanks a lot

       

      Ennio 




        • 1. Re: One Table - more contacts in the same layout
          comment_1
             Obviously, you need two relationships between Letters and Contacts. I am not sure what role your existing relationship plays here. I would do something like this:

          Contacts
          • ContactID
          • Name
          ...

          Letters
          • LetterID
          • BuyerID
          • SellerID
          ...


          Relationship #1:
          Letters::BuyerID = Contacts::ContactID

          Relationship #2 (requires placing a new occurrence of the Contacts table on the relationships graph):
          Letters::SellerID = Contacts 2::ContactID


          This way you can write:
          Hi <<Contacts::Name>>, I'm very glad to annunce you that <<Contacts 2::Name>> will ships the book tomorrow.