Applying Conditional Formatting to Multiple Objects

Conditional Formatting, a FileMaker layout-level feature, 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.

Working with Conditional Formatting

Since applying Conditional Formatting to multiple objects works differently than similar FileMaker features, you should keep a few important points in mind when working with Conditional Formatting:

  1. Unlike Buttons or Tooltips, FileMaker 10 offers no Layout Mode visual indicator of Conditionally Formatted objects. [Note: FileMaker 11 added a visual indicator.]
  2. 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.
  3. 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.
  4. The Conditional Formatting dialog does not indicate that this feature was previously applied to other objects currently selected. This differs 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.
  5. Should you proceed to make changes in the Conditional Formatting of multiple selected objects, all text-based objects will receive the new formatting. You will lose any previously specified Conditional Formatting settings for these objects.

So what does this mean for us?

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. 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 tweak the frontmost field, 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 do not have Conditional Formatting applied.

Conditional Formatting is a powerful feature, but developers should proceed with extra care and caution.

1 thought on “Applying Conditional Formatting to Multiple Objects”

  1. Completely agree the best things in Filemaker are sipmle implementations that can then become complex. Classes aren’t the sort of thing that someone just introducing themselves to databases would grok quickly. If it were implemented into the starter solutions, a newbie adjusting the size of the font for Vendor Name in Purchase Orders would be very confused when ten other fields changed sizes. So I’d say classes and CSS/like styles should be hidden away from the casual user, but made available when they’re ready to move up.

Leave a Comment

Your email address will not be published. Required fields are marked *

Are You Using FileMaker to Its Full Potential?

Claris FileMaker 2023 logo
Scroll to Top