1 Reply Latest reply on Mar 2, 2011 8:18 AM by philmodjunk

    Linking two Databases together using company field



      Linking two Databases together using company field


      Help,    I am using the contact management template and the inventory management template.  I went into file and then external data sources on both template and linked them to the other template.   Then I took company textbox form contact management and copied it to inventory.   Both databases are linked in the ERD by the company name text box.   When you look at where the company text box that I copied over from contact management it says table is missing.  How should I edit the keys to make company the PK?   This is my first go around with FileMaker!!!  Any advice would be greatly appreciated.  




        • 1. Re: Linking two Databases together using company field

          First to answer specifically to your question. That "table is missing" should read: "Table Occurrence is missing". Each table occurrence is a "box" in Manage | Database | Relationships and in most places where you would choose a table, you are really choosing a table occurrence as that is how you link in your reference to a table in context of what relationships you have defined.

          After pasting in your field from the other file, double click it to pop up the specify field dialog. If the correct field and table occurrence isn't selected, find the correct table occurrence in the drop down and then select the field. (When you paste the field into a new layout, FileMaker attempts to do this for you by matching up table occurrence and field names. If no matching table occurrence can be found, you get this missing table message.)

          You have another problem, however. When you link your tables by company name, you are setting yourself up for other potential problems. Company names are not unique, they change and since you are typing in company names, there's at least a small chance of mistyping a company's name. If you should enter data into two or more tables that are linked by company name, attempting to change a company's name will break the link to the other related records unless you also find them and correct their names as well.

          There's an alternative approach you can use with these starter solutions. There should be a serial ID field in the contact table that uniquely identifies each contact record. You can use this field to link to a matching contact ID field in the second table. (Link a serial id field in the parent table to a simple number field in the other. )