2 Replies Latest reply on Sep 21, 2009 9:28 AM by DennyHayes

    Moving Field Relationships Between Table Occurrences



      Moving Field Relationships Between Table Occurrences


      In other words, if you have field A and field B related to a field in table T, and so that you don't have a mess on the relationship layout, you create a second occurrence of table T called T2. Since tables T and T2 are actually the same table, just difference occurrences on the relationship layout , is there a way to move the relationship from table occurrence T to table occurrence T2. For some reason when you change the relationship from T to T2, every field that is related through T looses it's connection to table T, even though you are basically using the same table and the same fields. It is as if multiple occurrences of a table on the relationship layout are not the same table.


      Is there a way to move a bunch of fields from one occurrence of a table to

      another occurrence of the same table, without destroying the relationship

      to the fields, so that you don't have to click on them one by one and

      select the new relationship for each?



      Could you clarify?  You can't move fields from one TO to another.  Fields

      belong to tables not TOs.  Do you mean you switching the underlying TO of a

      layout and don't want to repoint all the fields?  There is a neat trick for




        • 1. Re: Moving Field Relationships Between Table Occurrences



          Thank you for your post.


          No, you cannot move the fields defined in relationships from one table occurrence to another.  For instance, if you have a relationship into one table based upon Customer ID, and you have a second relationship into the same table based upon Inventory ID, you do not want the Customer ID involved in the second relationship.  However, if you change the Customer ID in the second table occurrence, this will reflect back to the first table occurrence, because you have the relationship back into your original table, and the Customer ID will link back to the first table occurrence.


          Maybe the better question is "Why do you want to add/change fields in the second relationship?" or "What are you trying to accomplish?"



          FileMaker, Inc. 

          • 2. Re: Moving Field Relationships Between Table Occurrences

            Well, when you have over 30 FM6 files in a file set, with 100s of fields, relationships, etc., looking at the relationship layout becomes a nightmare, with connections mostly going to the main file. That layout looks pretty, but I never did like it, because when you get large complex file sets, it becomes a mess. The old way was much better with simply a list of all the relationships, and if you group them and indicate what arelationship does in the name, it can be understood better. This file set has been developed over a few years, and is now being converted from FM6 to FM10, because former attempts using FM7 and FM8 required way too much work. FM10 seems to do a lot better at conversions, but if you can reconnect certain groups of relationships to different occurrences of the main file/table, it get a little less confusing. Another part of the problem is using straight lines directly to the related tables rather than 90 degree lines such as used in normal flow charts. But I guess from a programming standpoint that might have been to difficult to do. 


            Anyway, I had also posted this message in the FMExperts forum, and it seems that there is actually a way to move a relationship from one table to another, but my first attempt didn't work so I replied back to the guy and he explained it better.  I haven't had time to try it yet, but it seems you can go into layout mode, copy the fields that you want to move, switch the name of both occurrences of the table, and paste the fields back on the layout. I assume that when you copy the fields it also copies the relationship, using the table name. But if you change the table names after you copy the fields and paste it back. it looks for that table name. Then once that is done you simply change the names back to what they were.