Wednesday, December 2, 2009

Build dynamic layouts using FileMaker tabs

One challenge that often arises during FileMaker development is the amount of screen real estate available - there's never enough. This becomes particularly challenging when data is being displayed in portals as you're generally limited to one row of fields per portal row to ensure readability. In some situations you also want sections of the screen to display different data depending on records selected from within a portal.

In previous versions of FileMaker, the usual solution was to use the "create a duplicate layout with the extra fields and the user thinks they're on the same layout" trick however this just leads to more maintenance down the road. There's now two layouts that need to be maintained! Even worse, developers working on the file in future might not know about the second layout and forget to make modifications to all relevant layouts.

One solution that we've deployed with good success is to use a set of hidden FileMaker tabs that contain the layout variations that need to be displayed. Read on for an explanation.

Create a FileMaker tab object with as many tabs as you require (one for each variation in fields being displayed). Make the tab lines hidden, match the tab colour to your layout background and set the pixel width of each tab to be zero. In the screen grabs below two tabs have been created (not hidden in this example).


Each tab can be used to display extra information for a selected portal row. If different records in the portal have an identifying 'Type' the appropriate tab can be shown when the relevant portal row is selected. Each tab has its own Object Name so you can easily switch between them.