FileMaker Utility Relationships Explored

From Dwayne Wright PMP
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here). 

The utility relationship is a name given to FileMaker relationships that are NOT based upon key fields but match fields with temporary data within them. Utility relationship match fields are temporarily edited for display or scripted data massage processes.

The basic idea is that the relationship is temporary and often uses a global field in the parent side of the relationship. This is often done to display different sets of data in a portal, used in a GTRR or used to batch process a found set of records in a script.

UTILITY RELATIONSHIPS FOR DISPLAY
The most common use for a utility relationship is filtering portal display data. A user makes a change within one or more match fields and the portal shows the related matching records based upon that change.

You may need to click the picture to see it better in an expanded view. Here you can see the Staff module within our new InBizness Real Estate product. The user makes a change to the start/end date fields to see their matching activities within those dates.

The match fields used for utility relationships are often global fields but not always. In the above example, the match fields are NOT global fields because it is possible you would want to see different range data for two staff members at the same time. For development needs such as this, making the switch from global match fields to stored match fields is very quick and easy.

UTILITY RELATIONSHIPS FOR PROCESSING
Another popular use for utility relationships is the batch processing of data. For example, lets say that a staff member has left the company and you want to script the process of moving their incomplete activities to a different staff member. You could setup a utility relationship to see those records and batch change their staff id assignment. For most purposes, these activities could be performed using find routines instead of utility matches. The decision to go into one direction or the other is primarily based upon the preference of the developer, the scope of the process or the frequency in which these processes need to occur.

Another big area for utility relationship batch processing is the cleaning up and transformation of imported data. You may have a process where data is regularly downloaded from a particular source and the way the data is organized is NOT compatible with the FileMaker database that is its intended target. So you may have a scripted routine that imports the data into a utility table, uses utility relationships to reorganize the data and then move that cleaned data from the utility table to the target, production level FileMaker table.


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

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