In working with non-equijoin relationship matches, you may have noticed one oddball operator in the little menu of match criteria. Most of them are familiar comparison operatorsbut what about the last one, the one that looks like an [X]?
That operator is known as a cross product (or Cartesian product if you really want to show off). The cross product does one and only one thing: It provides a "universal match" between the records in two tables. What this means is that it does no limiting of any kind. If you think of a relationship again as a kind of query, a cross-product relationship is a "find all" query. If you define a cross-product relationship from Customer to Invoice, a portal based on that relationship would always show all invoices, no matter which customer record was being viewed. The choice of fields on the left and right sides is more or less unimportant; this "all to all" relationship is fulfilled regardless of the choice of match fields.
Cross products really make sense only by themselves, in single-match relationships. They have no effect at all if they're added into multimatch criteria sets. A cross-product match condition is always true, so it can never further limit the potential matches of other criteria. Of course, if that makes your head spin, you can just take our word for it.
Note
Savvy users of older versions of FileMaker may recognize that the cross-product operator replaces the technique that used to be known as a "constant" or "always-true" relationship. In that technique, you had to define specific fields on either side that explicitly matched each other (generally a pair of calculations that each evaluated to 1) and build a relationship between the two fields. FileMaker 7 and 8's cross products provide the same feature in a more integrated fashion.
Well, that explains what a cross-product relationship is, but not how you might want to use one. The cross product is the ultimate nonstructural relationship. After all, its purpose is to show all of something. These are generally used for various user-interface purposes. Sometimes you might want users to pick from a list of things, for example, and it's more pleasing to allow them to pick from a scrolling list in a portal than from a drop-down list or menu. Generally such techniques need to be coupled with some scripting to react to users' choices.
For further examples of the uses of cross-product relationships, see Chapter 16, "Advanced Portal Techniques," p. 471. |
Part I: Getting Started with FileMaker 8
FileMaker Overview
Using FileMaker Pro
Defining and Working with Fields
Working with Layouts
Part II: Developing Solutions with FileMaker
Relational Database Design
Working with Multiple Tables
Working with Relationships
Getting Started with Calculations
Getting Started with Scripting
Getting Started with Reporting
Part III: Developer Techniques
Developing for Multiuser Deployment
Implementing Security
Advanced Interface Techniques
Advanced Calculation Techniques
Advanced Scripting Techniques
Advanced Portal Techniques
Debugging and Troubleshooting
Converting Systems from Previous Versions of FileMaker Pro
Part IV: Data Integration and Publishing
Importing Data into FileMaker Pro
Exporting Data from FileMaker
Instant Web Publishing
FileMaker and Web Services
Custom Web Publishing
Part V: Deploying a FileMaker Solution
Deploying and Extending FileMaker
FileMaker Server and Server Advanced
FileMaker Mobile
Documenting Your FileMaker Solutions