Database Reference
In-Depth Information
FREQUENTLY ASKED QUESTION: HOW DO I KNOW WHERE TO SORT?
I saw that I can choose the sort order for a portal in the Portal Setup window. Now you're saying I
can set the sort order in the relationship. What's the difference? Does it matter?
When you set a sort order in the Edit Relationship dialog box, it applies to the relationship itself.
Any time you use that relationship, the sort order applies: in portals on any layout, when showing a
single related field, when referring to a related field in a calculation or a script, and when finding a
set of related records ( Using GTRR to Create a Found Set ) .
A portal's sort order, on the other hand, applies only to the portal itself. If you don't tell the portal to
sort, then FileMaker uses the relationship's sort order (or, if there isn't one, the order in which the
records were created) instead.
If you know that every time you look at your related data it should be shown in a specific order, then
set the relationship to sort. But if you think the related data ought to be sorted different ways in dif-
ferent contexts (and thus in different portals), then don't sort the relationship, because that's making
your database do extra work—FileMaker has to sort the records for the relationship and then sort
them a different way for your portal. (You don't usually see this process happening, but FileMaker is
doing it behind the scenes. With a portal displaying a lot of related records, across a slow network,
you might sometimes see a Sort dialog box appear.) So when you're planning on viewing data in
lots of different orders, rely on sorted portals instead of sorted relationships.
TIP
Don't let the Tables/Relationships label on these buttons confuse you. You have a whole tab dedic-
ated to managing tables . These tools are strictly for table occurrences , not the underlying tables the
occurrences refer to.
The Tables/Relationship tools let you create new TOs or edit or delete existing ones:
▪ The Add Table Occurrence tool shows a Specify Table window where you select the
table the new occurrence should refer to. You can also give the TO a name. If you choose
a name that's already in use, then FileMaker appends a number to the end of the occur-
rence's name. If this happens, change the name to something more descriptive right away
to save yourself from confusion later.
▪ The Create Relationship tool shows the Edit Relationship window as you saw it first on
Creating and Using Portals , except you now have access to pop-up menus for selecting
the TOs you want to relate to one another. Dragging a relationship is super easy, but you
get only one flavor. Using the button instead lets you set up multicriteria relationships
( Multiple Criteria Relationships ) and specify whether the relationship allows creation
Search WWH ::




Custom Search