DevCon Day 2 featured two sessions by a couple of FileMaker insiders. Andy LeCates showed off some really slick implementations of Conditional Formatting and some innovative ways to use tab controls. Jon Thatcher eliminated a lot of the confusion about File Maintenance and Recovery practices.
Before we get to the good stuff. Geoff forget to mention that he was one of 10 recipients of the “Mad Dog PR Award.” The award honors people who generate positive press and interest in FileMaker Pro. Someone must have read our blog :-). Alright enough plugs for Geoff, his head is growing by the minute… on to the good stuff.
## Andy LeCates: Modern FileMaker Design Practices
This session was basically a showcase of some of the innovative FileMaker 8+ techniques that Andy used to make his ridiculously cool Digital Junk Draw (I can’t remember if that’s what he called it but you get the idea). There is entirely too much stuff to squeeze into one article but here are a couple of the highlights. I will definitely write up a more in depth look at the techniques when DevCon is over.
### Conditional Formatting
Andy had 5 or 6 great tips about using Conditional formatting. His solution allowed a user to resize the window and while doing so the Size of the Text would actually grow or shrink accordingly. He also showcased a unique way of displaying labels which allowed you to actually place the field label behind the field itself. Perhaps my favorite of all his tricks, was a change in the color of a field whenever it was clicked in. So whenever a field was active it appeared to be yellow to help a user identify which field they were in.
Andy also explained a couple of little tidbits about how/when Conditional Formating is triggered.
1. Conditional Formatting is triggered whenever the window is redrawn
1. Conditional Formatting is triggered whenever a field that the formats calculation is based upon is changed
1. Conditional Formatting is *not* applied to an active field
1. User formatting overrides conditional formatting
1. Multiple formatting rules can be applied to a single object with the last one taking precedence
With these rules in mind, you might be able to figure out some of the tricks he used above. If not, just come back on Thursday and I should have some examples and much more thorough explanations about these techniques.
### Tab Controls
Andy also presented some interesting GUI ideas by taking advantage of tab controls and the addition of the FileMaker 8.5+ ability to name objects. He basically uses FileMaker 9’s new setting to set the default tab width to zero pixels, then makes sure that the line width for the tab control is set to 0 as well. With those two settings, a tab control has no visible tabs. Your problem now is how to switch tabs. To solve this you have to name each tab which can be achieved by editing the object name field in the object info popup.
Having said this, you may be asking yourself why the heck would I want to go through all this work when I could just use a basic tab control? Andy’s solution takes advantage of this named zero-width tab control to execute a nifty implementation of portal sorting. He basically creates a bunch of different portals which are all based on the same table occurrence but sorted differently. He then puts each portal on a different tab and creates buttons that “sort” the portal. The “sorting” is actually just switching to a tab where the portal has the corresponding sort order! It *appears* to be sorting and the user doesn’t know the difference.
> Note: Your other option would be to create a bunch of different relationships that have different sorts applied to them. Andy’s version is *much* cleaner and won’t clutter up your relationships.
There are many other interesting applications of this design and it definitely can be an excellent tool in your GUI arsenal. I probably went a little fast and glossed over some of the intricacies of the solution so we will definitely revisit this as well.
## Under the Hood: Recovery and File Maintenance with Jon Thatcher
This was probably my favorite session so far because it clarified a lot of the misconceptions about the different options for keeping your files healthy. This session is definitely going to get a post with all of the copious information provided later on in the week but here are a few tidbits.
**Only use Recover if Save As Compacted doesn’t work**
This may seem like a no brainer but it is not obvious that `Recover` should only be used as a last resort. `Save as Compacted` removes spaces within a data block and puts the data in optimum order. Recover actually scans all the blocks to ensure that they are all valid and proceeds to dump any invalid data. There is no need to make this last ditch effort if you haven’t used `Save As Compacted` because you could potentially lose lots of data during the Recovery process.
**Don’t Use the File Maintenance menu within FileMaker Pro**
This threw me for a loop as well but after thinking about the reasons it makes entirely too much sense. The File Maintenance options `Compact` and `Optimize` are the same processes that occur when the `Save as Compacted` command is executed. The significant difference is that `Save As Compacted` actually creates a second file that is compacted and optimized while running the File Maintenance commands actually operates on the working copy. By working on the original, you aren’t getting the benefit of creating a whole new copy of the file and you could potentially damage the file you are actually attempting to fix(although it’s unlikely). Another benefit to `Save As Compacted` is the problem with your file could be the sector of the disk where it’s situated and by creating a new file in a different location you might have better results.
There are a bunch more tips but I have to run to another session so we’ll put some more up later in the week.