You should have a table of contacts linked to a one-to-many table of companies. Unless a contact could work for more then one company. Then you would need a join table between the 2, maybe something called Employment.
Assuming your structure is set up correctly, in the Contacts portal, on the Company Table, make sure it is set up to allow the creation of records. Then put the contacts primary key field in the portal, sorted as a dropdown list. You'll set up a value list,based on the contacts primary key field, and check the box .."show values from second field", and select the name field. Then when you select a primary key, the rest of the fields in the portal will populate
If you do need to use a join table and this is sometimes needed to link contacts to companies when a contact needs to be linked to more than one company (one person can own several companies, an agent, broker or lawyer can represent several different companies...)
Make your portal a portal to the Join table instead of to companies. You can then format the foreign key field for contacts in the join table portal as a value list for selecting a contact. You can either use a portal to contacts for adding new contacts or set up a script that creates a new contact record, then creates a new linking record in the join table so that a new record with blank contact fields appears in the join table based portal where you can then enter the contact info for the new contact.
If I ever manage to finish Adventures In FileMaking #3, it will deal with the ins and outs of many to many relationships.
I've got a join table setup between the tables companies and contacts which allows creation of new records. The only issue that I'm having is to add an already existing record in the portal. Typing in a new one in the portal adds a record into contacts. But what if I have created a contact (in table contacts) that I want to add in my portal?
This is something I can't figure out or find anywhere.
Please read my last post again.
To connect a company record to an existing contact, use a portal based on the JOIN table NOT contacts. This allows you to create the needed new record in join table without also creating a new record in contacts at the same time.