From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer
FileMaker relationship context can be one of the most challenging hurdles for a FileMaker developer starting out. In many cases, you can create a very good FileMaker database and skirt right past context issues. However, as your FileMaker database grows and evolves, relationship context will be an area in your design that you will need to deal with.
Let’s briefly cover the aspect about how a layout is tied to a table occurrence. This is done because depending on where you are (ie what layout), your relationship possibilities will change. First off, these setting will say this layout is linked to this table. In FileMaker 6, you didn’t have to worry about that because you couldn’t go beyond one table to one file. Second, the table occurrence you link a layout to defines what related table occurrences that layout can use. The common term for this is layout table context.
In the Relationship Tab of Manage Database dialog box, FileMaker provides a graphical interface for defining relationships between tables. This work area for relationship design is called the relational graph. When a table appears in the relationship graph, it is referred to as a table occurrence.
The linking of a table occurrence to a layout will affect some of the related fields you can see from this layout. I quickly began to add the name of the table occurrence ( a code to it at least ) in my layout names, so that I can recognize any limitation the defined table occurrence may place on me. In general discussions, I've heard the relationship between a layout and a table occurrence referred to as a table context setting.
Here you can see where the table occurrence comes into play in the layout setup dialog box. This pull down menu highlighted ( Show records from ) will show you all the defined table occurrences and you pick one to link to the layout.
Here you can see the defined table occurrences for the FileMaker file I’m working on. You can see how some of the base tables appear more than once but have different names. This is because how they are used on the relational graph.
A classic example of layout context is when you want to drag a new field to a layout and you click the pop down menu to see what your choices are besides the current table the layout is linked to. Here you will see a listing of table occurrences linked to the layout table occurrence and ones that are not.
The advantage of Anchor / Buoy (where no two base tables touch) is a great advantage in filtering what you will see here. If base tables touch, you inherit seeing everything they touch and that can make the process of picking the right table occurrence for your needs quite a challenge!
Let’s briefly cover the aspect about how a calculation is tied to a table occurrence. As you know from our previous discussions, FileMaker relationships flow in a bidirectional manner. In an Anchor / Buoy design, we only utilize one direction of left to right or Anchor to Buoy. We also talked about how every layout can only be assigned to the Anchor table occurrence. I put it to you that every calculation should only be tied to Anchors as well. In fact, FileMaker will default to that action for every new calculation. This is because the Manage Database dialog box, by default, will show the calculations in context for the current layout (and that is an anchor).
If you are not aware of calculation context, look at the top of the define calculation dialog box and you will see it. There is a pull down menu that allows you to select a table occurrence as a reference point for your calculation. So if your calculation involves related values, you have to make sure your reference point (aka point of context) is set correctly. Anchor / Buoy helps in this matter because the naming convention you use to name your buoys will always allow you to pick the correct related table occurrence for the task at hand.
More info about the author and FileMaker in general, contact me at email@example.com.
© 2008 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.