Friday, September 19, 2008

EXAMPLE: Multiple Portals But Only One Child Table

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

Typically when you see a layout with three portals on it, you assume that there are 3 different tables those portals go to. This is particularly true if all three of the portals are unrelated. However, that does NOT have to be the case. You can have a child table contain data for more than one entity by using multiple table occurrences. In fact, you can have more than one portal for the same table occurrence. You would do this if the portals have different fields or sort orders.


Take the child table in this example, it stores phone number, pets and hobbies of a particular person. As with most techniques that are a little off center, this one has some advantages and drawbacks. An advantage is that you don't need as many files. A disadvantage is that you may have large groups of unrelated data in the same file.

What we did was create 3 fields for our parent match fields. Each is a calculation field that has the records unique record id concatenated with a text string for it's purpose. You may be asking " Why not just use the parent keys unique record id field for all three relationships?" Displaying information and adding new data would work just fine in this example. However, a GTRR ( only related records ) command would break. That is why I create the three different parent match fields.

An example file can be downloaded at ...
http://www.dwaynewright.com/blogfiles08/multiportP.zip
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.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.


====================== ADVERTISEMENT ==============================
Check out the FileMaker Calculations Explored blog at http://dwaynewright.blogspot.com/ or subscribe via your news reader. ===================================================================