Creating Cross-Product Relationships

 <  Day Day Up  >  

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 operators ”but what about the last one, the one that looks like an X?

graphics/new_icon.jpg

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 multi-match 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 previous 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'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 a variety of 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 dropdown list or menu. Generally such techniques need to be coupled with some scripting to react to users' choices.

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net