Working with Data from Distant Tables

 <  Day Day Up  >  

graphics/new_icon.jpg

The new relational model of FileMaker 7 has significant improvements in its ability to handle a relational "tree." As an example, suppose you have a classic Customer-Product-Invoice system with a Relationships Graph like the one shown in Figure 7.24.


Figure 7.24. Relationships Graph for a system that tracks customers, products, and invoices.
graphics/07fig24.jpg

You might want to do a number of things in this system that would have been slightly cumbersome in previous versions of FileMaker. Suppose, for example, that you'd like a portal on a customer layout showing all the products that customer had ever purchased. Previously, you might have used a somewhat complicated technique involving global fields and the Copy All Records script step to "hop" from a customer record to the customer's related invoices, then again from the invoices to their related line items, and finally from the line items over to products. Scripting this process was relatively slow, and the technique was not guaranteed to work for large data sets.

By contrast, in FileMaker 7 it's as simple as creating a portal on the Customer layout and choosing the Product table occurrence as your data source. FileMaker 7 correctly navigates the Relationships Graph from Customer to Product and brings you back a listing of all products ever purchased by a given customer. Though this is somewhat difficult to illustrate concisely (we'd need to show the intervening invoices), Figure 7.25 shows what the result might look like. Even though some of the products have been entered on several invoices for this customer already, each one appears only once, as you would expect.

Figure 7.25. FileMaker 7 lets you perform a "deep" relational view, allowing you to display, for example, all products a customer has purchased in a given year.
graphics/07fig25.gif

The technique could be reversed . For example, from the viewpoint of a Product record, you could just as easily see a portal of all customers who had ever purchased that product.

This capability to perform multi-step relational navigation in a single swoop is a powerful new feature of FileMaker 7. Combined with some of the multi-match and non- equijoin relationships you saw earlier, this technique can produce quite sophisticated queries. Think back to the example that used a relationship to isolate a customer's invoices in the first quarter. Well, if those invoice records eventually contained a link back to a products table, you could use a "deep" relationship (as we sometimes call them) to produce a portal of just those products purchased by a given customer in the first quarter.

 <  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