Go to Contents
Previous
Page
Next
Page
Contents > Editing objects on layouts > Selecting and working with objects on a layout > Defining conditional formatting for layout objects

Defining conditional formatting for layout objects
You can format layout objects to change automatically when they meet specified conditions. For example, you can use conditional formatting to automatically display balances that are over 30 days past due in bold, red text. Conditional formatting settings affect only the way data is displayed or printed, not how data is stored in the database.
To specify conditional formatting for objects:
1. In Layout mode, select one or more objects.
For more information, see Selecting objects.
2. Choose Format menu > Conditional.
3. In the Conditional Formatting dialog box, click the Add button to define a new condition.
4. Specify the condition for formatting data in the selected objects.
To specify a format based on common conditions, under Condition choose Value is. Then choose one of the following conditions and set the parameters.
Choose To format
between
Data that falls between and includes the values specified
not between
Data that does not fall between and does not include the values specified
equal to
Data that is equal to the values specified
not equal to
Data that is not equal to the values specified
greater than
Data that is greater than the values specified
less than
Data that is less than the values specified
greater than or equal to
Data that is greater than or equal to the values specified
less than or equal to
Data that is less than or equal to the values specified
containing
Data that contains the value specified
not containing
Data that does not contain the value specified
beginning with
Data that begins with the value specified
ending with
Data that ends with the value specified
empty
An empty field
before today
Date data before the current day
today
Date data on the current day
after today
Date data after the current day
more than x days passed
Date data more than the specified number of days in the past
more than x days ahead
Date data more than the specified number of days in the future
less than x days passed
Date data less than the specified number of days in the past, including the current day and any future days. See notes below.
less than x days ahead
Date data less than the specified number of days in the future, including the current day and any past days. See notes below.
To specify a format based on a calculation, for Condition choose Formula is. Then click Specify to define the calculation. For more information, see Specify Calculation dialog box.
Tip  Use the Self function to reference data for the selected object. For more information, see Self.
5. Specify the text and field fill format for data that meets the conditions you specified.
For example, select bold red text appears in a yellow field, when data meets your criteria.
Tip   Click More Formatting to see additional formatting options.
6. Click OK.
Changing conditional format settings
Moving, disabling, enabling, and deleting conditional format settings changes the order in which conditional settings are applied to an object.
To Do this
Edit a condition setting
Double click the condition, change settings, then click OK.
Change the order of conditions in the list
Use the double arrow (arrow icon ) to drag the condition to a new location.
Disable a condition
Clear the condition checkbox for the setting.
Enable a condition
Select the checkbox for the condition.
Delete a condition
Select the condition, then click Delete.
Notes
You can set conditional formatting on the following layout objects: text, fields (including fields from external ODBC data sources), merge fields, layout symbols (date, time, page number, record number, and so on), text-based buttons, and web viewers. Conditional formatting is not available for non-textual objects (such as a rectangular layout object).
Conditional formatting can be set on single, multiple, and grouped layout objects.
To see the effects of conditional format settings while you work in Layout mode, choose View menu > Show > Sample Data. Note that your file must contain record data that meets the formatting criteria you have specified for conditional formatting to appear.
When you set multiple formatting conditions on an object, all conditions are evaluated starting from the top of the list. Each condition that evaluates "true" is appended to the objects previous format settings.
When you use the Value is option with the predefined conditions less than x days passed or less than x days ahead, the current date is included in the number of days you specify.
Examples
If the current day is 11/20/2009 when you specify less than 4 days passed:
If the data value is 11/16/2009, the condition evaluates false
If the data value is 11/17/2009, the condition evaluates true
If the data value is 11/20/2009, the condition evaluates true
If the data value is 11/21/2009 (or any date in the future), the condition evaluates true
If the current day is 11/20/2009 when you specify less than 4 days ahead:
If the data value is 11/24/2009, the condition evaluates false
If the data value is 11/23/2009, the condition evaluates true
If the data value is 11/20/2009, the condition evaluates true
If the data value is 11/19/2009 (or any date in the past), the condition evaluates true
Number and date format settings (specified in the Number Format and Date Format dialog boxes) are applied after conditional formatting settings and are therefore preserved, even if data meets your conditional formatting criteria. However, sometimes number, date, and conditional format settings are combined. For example, if you set negative numbers to display in red in the Number Format dialog box and also set conditional formatting on the same field to display negative numbers in blue with the fill color yellow, the result will be a red number in a yellow field. System formats have no affect on conditional formatting settings.
Conditional formatting settings are not transferred when records are copied within FileMaker Pro files or exported to other FileMaker Pro files.
If you use Apple events to Get Text As Style, conditional formatting settings are not transferred. (Mac OS).
Related topics
Creating and managing layouts
Selecting and working with objects on a layout
Formatting text
Specifying formats for fields containing numbers
Specifying formats for date fields

Contents > Editing objects on layouts > Selecting and working with objects on a layout > Defining conditional formatting for layout objects
Previous
Page
Next
Page