Format Condition (ttadv9504m000)

Use this session to define the conditions for which to apply a specific style.

If the “Or” operator is selected, records matching all combined conditions will have the style applied. The brackets are automatically set by the session; the “And” operator has priority.

For example, in the Sales Orders (tdsls4100m000) session, these conditions can be defined:

Condition           Icon
IF ( Sales Office = SLS    
AND   Order Amount > 10000 ) Alert
OR ( Sales Office = SLS    
AND   Sales Order Status >= Confirmed ) Confirm

The style of the last matching condition overrules attributes on a previous style. In the example, if a Sales Order with Sales Office “SLS” has status Confirmed and an amount larger than 10000, then the Confirm icon is displayed. If the first condition also defines a Background Color for a specific field, and the second condition does not, then that color and the confirm icon are displayed.

Condition on Field

If ‘AND’ is selected, this condition will be combined with the previous ones. If ‘OR’ is selected, this is the start of a new condition.

Opening parenthesis

Together with the closing parenthesis, this indicates the boundaries of the grouped conditions.

Field Name

The field on which the condition is based. For the first condition of a group, the field selected in the header is always used.

Comparison Operator

A comparison operator to compare the field with the field or value specified in the next field.

Field Name/Value (1)

The field or value to which the first field is compared.

You can compare the field to a fixed value or to another field in the session. You can zoom to select the second field.

Notes

  • If the field is an enumerate, you can zoom to select an enumerated constant.
  • To compare a string field to a fixed value, the value must be surrounded by quotes.
  • You cannot compare a date field to a fixed date. You must always compare to a relative date. You can specify, for example, these values:
    • >=-0 or >=+0 (later than now)

      The + or - is mandatory. If you specify a 0 without a + or -, the 0 is considered as an absolute value. In that case the filter checks whether the field is blank.

    • +1 (tomorrow)
    • -7 (1 week ago)
    • -365 (1 year ago)
  • You can compare a UTC date.time field with a fixed value. That value must be numeric. For example: 1440972000 for 8/31/2013 00:00:00.
  • You can compare a UTC date.time field with the current date and time. To do this, use the utc() function.

    For example, you can specify [UTC date.time field] < utc().

  • You can check whether a field is blank. For example:
    • <date field> = 0
    • <string field> =
Note: The Easy Filter Row, Managed Filters and Conditional Formats are different concepts, conditions are not always interchangeable. For example a UTC date with date = 0 is not supported in the Easy Filter Row. A Relative Date works for both Filters and Formats. To Filter with a Formatted Icon or when using a Filter Button originating from a Format, the conditions must work for both.

Examples

This table shows some examples for string, numeric, and enumerate fields:

Field Name Comparison Operator Field Name/Value (1) Arithmetic operator Field Name/Value 2
Order Amount > 10000    
Search Key >= "C"    
Search Key =      
Order Status = Closed    
Book Price > Active Price    
Book Price > Active Price + 100

This table shows some examples for date (not UTC!) fields:

Field Name Comparison Operator Field Name/Value (1) Arithmetic operator Field Name/Value 2 Comment
Start Date < -365      
End Date = 0     End date = blank
End Date = +0     End date is today
End Date = -0     End date is today
End Date = Start Date      
End Date > Start Date + 365  

This table shows some examples for UTC date.time fields:

Field Name Comparison Operator Field Name/Value (1) Arithmetic operator Field Name/Value 2 Comment
Planned Delivery Date > Requested Delivery Date     The planned delivery date and time is after the requested delivery date and time.
Requested Delivery Date < utc()     The requested delivery date and time is before the current date and time.
Requested Delivery Date < utc() - 86400 86400 seconds is exactly 1 day.

The requested delivery date and time is more than 1 day before the current date and time

Arithmetic Operator

Select an arithmetic operator if you want to combine the field or value specified in the previous Field Name/Value (1) field with another field or value.

Field Name/Value (2)

Specify the field or value that you want to combine with the field or value specified in the previous Field Name/Value (1) field.

Closing parenthesis

Together with the opening parenthesis, this indicates the boundaries of the grouped conditions.

Foreground Color

Select a color to use as foreground color for the Formatted Field if the condition applies.

Background Color

Select a color to use as background color for the Formatted Field if the condition applies.

Background Style

Specify Fill or Round.

For enum fields, only the Fill background style is allowed. This prevents confusion with enum domain formatting, defined in the Enum Domain Formatting (ttgfd4525m000) session, which always uses a round style.

Row Color

Select a color to use as background for the entire row if the condition applies.

Row Icon

Select an icon to show in front of the row if the condition applies.

Preview Device

This field shows a preview of the selected style.

Row Preview

This field shows a preview of the row color.