FileMaker Layout Setup Makes A Difference

From Dwayne Wright PMP - Certified FileMaker Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

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. The good news is that after you have grasped the concepts and conquered context a few times, proper relationship context design becomes second nature.

FileMaker layouts are linked to a defined table occurrence. Please note that I said a table occurrence and not a table, although by default the occurrence is linked to a table. 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. It is possible to have a table represented by multiple table occurrences, each with a unique name to identify it. These named occurrences are then used in defining relationships, attached to layouts and used for context in calculations, scripts and value lists. In fact, more times than not, you will be referring your programming to table occurrences and not the source tables themselves.

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.

 

In this example, I created two tables ( people and phone numbers ). However, in the relationship graph area, I have three table occurrences. The people table has two table occurrences, which isn't that uncommon. Now in the second example, I don't have the people 2 occurrence wired up to anything and normally you would. Next I created a layout linked to the people table occurrence and then placed a portal linking to the phone table. This way you can enter in almost unlimited number of phone numbers for each person record. I then duplicated that layout but assigned it to the table occurrence of people 2. There are buttons that allow you to hop back and forth between the layouts.

You will notice the people information stays the same but the portal doesn't show any related records on the people two layout. Both people layouts are linked to the people table but they use different table occurrences in the relations graph.

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.

An example file can be downloaded by clicking (here)

More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2007 - 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.