Conditional Formatting is a FileMaker layout-level feature that allows you to customize the appearance of text-based objects. You can use Conditional Formatting to dynamically control the font, style, size, text color, and fill color. The conditions used may be based on the text object’s value or on the result of a calculation.
Since applying Conditional Formatting to multiple objects works differently than similar FileMaker features, there are a few important points to keep in mind when working with Conditional Formatting:
- Unlike Buttons or Tooltips, FileMaker offers no Layout Mode visual indicator of Conditionally Formatted objects.
- When you select two or more objects and attempt to apply Conditional Formatting, the dialog will display the Conditional Formatting settings of the frontmost text-based object. This is true regardless of the Conditional Formatting previously applied to the other objects and whether or not the objects are grouped.
- As long as at least one of the selected objects can have Conditional Formatting applied to it, the dialog will display. Of course, the Conditional Formatting will only be applied to the appropriate objects.
- The Conditional Formatting dialog gives no indication that this feature was previously applied to other objects currently selected. This is different from the behavior of Field Borders and Anchors, which each display a horizontal line in the dialog checkbox when settings vary for the selected objects.
- Should you proceed to make changes in the Conditional Formatting of multiple selected objects, all text-based objects will receive the new formatting and any previously specified Conditional Formatting settings for these objects will be lost.
So what does this mean for us?
It probably goes without saying, but I’ll do so anyway…be VERY careful when applying Conditional Formatting to multiple objects at once. It is very easy to blow away the conditional formatting of objects.
The Database Design Report that you can generate (using FileMaker Pro Advanced), documents the conditional formatting applied to layout objects. Check it or test each object’s Conditional Formatting individually before changing a layout’s Conditional Formatting.
There are a few measures that you can take to combat the lack of visual indicators on Conditionally Formatted objects. In fact, it is fairly simple to create your own visual indicators. You can display notes on screen containing reminders of the Conditional Formatting applied to the layout. Then apply Conditional Formatting to the note that will hide it from view in all modes except Layout Mode.
You can even create a homegrown function much like the “Show Tooltips” menu item. Add a final condition to each Conditionally Formatted object with the formula $$HIGHLIGHT_CONDITIONAL_FORMATTING. Set the fill color to bright yellow or some other obnoxious color. Then use a script to toggle the global variable, and thus the obnoxious fill color, of all Conditionally Formatted objects.
Of course, one developer’s limitation is another developer’s feature. We can choose to use these unexpected behaviors to our advantage. For example, let’s say you intend to apply Conditional Formatting to all the fields of a portal. You can just tweak the frontmost field and once you are satisfied with its Conditional Formatting, select all the portal’s fields and quickly apply the frontmost field’s Conditional Formatting to all the selected fields.
You can also remove Conditional Formatting quickly from multiple objects by ensuring that the frontmost of the selected objects does not have Conditional Formatting applied.
Conditional Formatting is a powerful feature, but developers should proceed with extra care and caution.
Related posts:
- Auto-Resizing Layout Objects Movie: Auto-resize in action One of the significant new...
- Lose a Layout, Gain a Function There is a rather obscure but very useful feature available...
- Tables, table occurrences, and relationships Understanding the difference between a table and a table...
Related posts brought to you by Yet Another Related Posts Plugin.











Posted by dheady on June 15, 2009 at 5:09 pm
