Flylib.com

Books Software

 
 
 

Special Edition Using FileMaker 8 - page 39


Portals

Portals are the last remaining tool you will find in the Status Area. Portals, as mentioned in Chapter 2, "Using FileMaker Pro," display information from related records that are associated with not only the layout but also the record a user is currently viewing on a layout.

Portals are a deep topic and cannot be separated from an in-depth discussion on data modeling. Furthermore, they can involve some advanced techniques to put them to good use. We've opted to cover portals in two chapters: Chapter 6, "Working with Multiple Tables," and Chapter 16, "Advanced Portal Techniques."



Troubleshooting

Copying and Pasting Fields Between Files

When I copy and paste fields from a layout in one file into another file, sometimes the fields retain their proper identity, sometimes they have no identity, and sometimes they have the wrong identity. Why is that?

When you copy fields from a layout in one file and paste them into another file, they may or may not retain their identity, as you've discovered . A field retains its identity when there exists a field in the destination file that has the same source table and field name as the source field. Additionally, the layouts must be based on identically named table occurrences. (It's not enough for the source tables to be named the same.) If the table occurrences match, but no similarly named field is found in that table, the field displays <field missing> when it's pasted into the destination file. If the table occurrence names don't match, the field shows up without any identity in the destination file.

Given the ease with which you can copy and paste tables using FileMaker Pro 8 Advanced, we recommend first creating a compatible schema in the destination file, and then copying your layout objects.

Determining Which Records Will Be Displayed on a Layout

I created a table occurrence that's supposed to display only invoices that are more than 60 days overdue. However, when I build a layout based on this table occurrence, I still see all the invoice records. What did I do wrong?

The problem here isn't anything you've done or haven't done, but rather your expectations. The table occurrence to which a layout is tied never determines which records from the source table are displayed on that layout. It merely determines the starting point on the Relationships Graph from which any action or object involving a relationship is evaluated. To view a set of related records, you will need to establish a perspective through which those records are viewed ; in other words, you'll need a portal.

If you have a layout that's tied to an occurrence any occurrenceof an Invoice source table, all the records from the Invoice table can be viewed from the context of that table occurrence. Think of it this way: A layout's table occurrence doesn't determine what records you can view from that layout, but rather, it determines what records the records of that table can view. So in the case of your table occurrence, which is supposed to show only invoices that are more than 60 days overdue, you'd need to view those via a portal from a layout tied, say, to a Customer table.



FileMaker Extra: Designing Cross-PlatformFriendly Layouts

One of the things that sets FileMaker apart from other database applications is that it runs on both Windows and Macintosh operating systems. You can even have a mixed platform of client machines. If you are developing a system that needs to run on both platforms, there are a few design considerations you'll need to keep in mind.

First, text blocks may be rendered slightly differently between platforms because of differences in the dots per inch (dpi) that each supports. Macintosh operating systems use 72 dpi, whereas Windows is built at 96 dpi. Font sizes are always described as 72nds of an inch regardless of platform, which means that a 12point font takes up 12 pixels (12/72nds of 72) on a Macintosh monitor, but 16 pixels on a Windows monitor (12/72nds of 96). In either case, this represents 1/6th of an inch.

The problem is that graphics and other layout objects are set to be a precise number of pixels tall and wide. If, for instance, you have a text block or field on a layout that's set to be 72 pixels wide, you'd be able to see fewer characters in that space on Windows. To account for this situation, you should make text blocks and buttons slightly oversized so that you don't truncate characters on Windows.

Not all fonts available on one platform are supported on the other; platform-specific fonts should be avoided. Some fonts display different baselines on Mac and PC. Trebuchet, for example, is a particularly bad culprit. The text baseline determines where the bottom of a font appears within a text block. Different baselines may mean that letters that hang below the baseline (such as g, y, j, p) have their tails cut off. Verdana tends not to be so bad, but it's a wide font and may consume too much horizontal space in a database. Lucinda is often a fairly safe font, if it is available to all your users. Tahoma also is fairly consistent between platforms. The combination of font and field box size is tricky, and you'll just have to experiment. Note that 10point Verdana with a 16pixel field height tends to work well on both platforms, but it's a very wide font. Use Arial/Helvetica if you're pressed for space.

The other big cross-platform layout problem is the viewable size of your layouts. It's generally desirable to create layouts on which users won't need to scroll to see important information. Different operating systems, even within a platform, may have different viewable layout areas, even at the same monitor resolutions . The problem is compounded by users who position their Dock or Start menu bar in different places. Windows XP tends to be the "piggiest" consumer of screen real estate and represents your lowest common denominator for a given resolution.

In the end, of course, the best advice when developing cross-platform applications is simply to test everything early in your development process on all operating systems you plan to support.

We also strongly urge you to create a template layout in which all your fonts have been selected, your field sizes established, and layout size and window size set. Then rather than having to carefully duplicate these standards across your solution, simply start all new layouts by duplicating this template.