AnsweredAssumed Answered

Many-to-many or Table Occurrences

Question asked by StefanSaeys on Sep 8, 2014
Latest reply on Sep 9, 2014 by philmodjunk


Many-to-many or Table Occurrences


Hello, I'm confused about the usage of a join table.

Initially I've started from a flat file that contained all the information in these two tables. Addresses from contacts were on the same as company addresses. Therefore when exporting my company records had the same number of records as my contacts.
I’ve got three tables in a many-to-many relationship: <companies>, join table <companies_contacts> and <contacts>. One company could use several contacts and one contact could be employed for several companies.
__pkCompaniesID (serial)__fkCompaniesID (number)__pkContactsID (serial)
company addresses__fkContactsID (number)contacts addresses

In the layout companies I've created a portal to companies_contacts. When I verify the address information it is still correct. Now I wonder how I can add an existing contact in the portal. What do I need to do? I've looked at several examples, but it seems that a lot of them only use a table occurrence (also the starter solution Invoices in FM13). I think I've found a solution to add a new contact to the portal (thx to PhilModJunk), but not to add an existing one. As the last functionality is more common I would like to make it work.