4 Replies Latest reply on Aug 8, 2011 11:49 AM by braxton

    Linking fields to tables using templates



      Linking fields to tables using templates


      This seems like a basic question that I can't find the answer after searching high and low.  I apologize if it is a common and repeat post.

      I have a table and layout of fields both of which I want to treat as a template and duplicate in the same file.  I am having trouble linking or relating the fields to the desired table.  Can I do this by selecting fields in bulk?  Or, do I have to do it one at a time?

      Just to be clear:

      I have Table A with Fields.  These field are on Layout A.  I duplicate Table A and call it Table B.  I create a new layout and label it Layout B and set it to "show" records from Table B.  I copy and past Layout A into Layout B.  In Browse Mode these fields now say "<Unrelated Table>".

      I can double click on each field of Layout B and make it show from Table B.  Can I do this in bulk instead of individually?

      Thanks so much.



        • 1. Re: Linking fields to tables using templates

          No, you have to fix them one field at a time.

          There are ways to play tricks with the table occurrence names of the two tables to avoid this, however. You can Open Manage | Database | Relationships and change "Table B" to "Table X". Then Change "Table A" to "Table B". Click OK to return to the Table A Layout. Enter layout mode and copy all the layout elements you want to paste to the layout for Layout B.

          Return To Manage | Database | Relationships and change the occurrence names back to their original names. Click OK, switch to Layout B and paste. Since Layout B now refers to the same text for an occurrence name as was selected for Layout A at the time you copied the field objects, they should not need individual updating.

          But please consider the following question before you do this as you may have a structural issue with the design of your database:

          Why do you want two different tables with the same set of defined fields?

          It's very possible that you can do what you want with layouts A and B, but use a single table for both that bring up different groups of records.

          If "table occurrence" is a new concept, you may want to investigate this tutorial: Tutorial: What are Table Occurrences?

          • 2. Re: Linking fields to tables using templates

            Thanks for the answer Phil.

            My initial structural design is probably not efficient.  I am creating a database to keep track of a wedding.  I want one table for guest management.  The other tables I was going to make up for other vendors ie,..  church, flowers, music, serving, cake....  I think I will just put in a new field classifying the vendor instead of multiple tables.  However, the geek in me wanted to tweak each a database for each vendor type to really customize the whole thing.  :0)

            Thanks again.

            • 3. Re: Linking fields to tables using templates

              You may want to structure your database to have a contacts table that lists all contact info for guests, bride and groom, and vendors. Then a vendors table with ID based link to contacts and you can then link in to contacts, "detail tables" specific to each type of vendor if you find you have the need for this.  This gives you a unified list of contacts for everyone involved yet you stilll can have your customized stuff in place as needed. You can even have a vendor who is also a guest without needing to enter contact info for that person more than once.

              • 4. Re: Linking fields to tables using templates

                Good idea.  Thanks.

                I did think to have another table for appointments related to the vendors.  You gotta love FM for staying organized!