Filter Expressions

From AgileApps Support Wiki
Revision as of 23:07, 22 April 2011 by imported>Alice
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Filter Expressions are complex queries that are built with a combination of Fields, Operators and Values. Filter Expressions are used to evaluate a group of records and return the records that meet the specified criteria. The filter is created by building an expression that defines some criteria.

Eligible Fields

In the Filter by Field Value section, these fields are available to use in Filter Expressions:

  • Fields in the object.
    Specify the fieldName. The value for the field comes from the current record.
  • Tags (Available in most Report Categories, via the Filter by Field Value section)
  • Workflow-related fields (Owner, State, State Change Date)
  • Rollup Summary Fields

Building Filter Expressions

Components of a filter expression are: <FIELD_NAME> <OPERATOR> <VALUE> <BOOLEAN OPERATOR>

FIELD_NAME
The name of the Field or Computed Field to use in creating a filter
OPERATOR
The following operators are available in a filter expression:
Operator Description
equals Returns only records with the specified value
not equal to Returns only records that do not include the specified value
less than Returns only records that are less than the specified value
less than equals Returns only records that are less than or equal to the specified value
greater than Returns only records that are more than the specified value
greater than equals Returns only records that are more than or equal to the specified value
contains Returns only records that contain the specified value
not contains Returns only records that do not contain the specified value
starts with Returns only records that start with the specified value
ends with Returns only records that end with the specified value
FIELD_VALUE
The search value; a value can be either a string, a date, a number
Follow these guidelines when specifying values:
  • The value can be partial text or whole words
  • Enclose strings and datetime values in 'single quotes'
  • To include multiple values for a field, separate each value using the pipe symbol (|)
  • To find values that are empty or nonexistent, type the BLANK keyword for the value
  • To specify date values, use the Date Format as specified in Company Information
  • To search for a blank (empty) field, use a field value of BLANK
Examples:
String: 'Paper 123'
Date: '06/06/2007'
Numeric Value: 9383
BLANK
BOOLEAN OPERATOR
Use the Advanced Options and New Value Filter links to display Boolean Operators.
Learn more: Using Boolean Operators and Parentheses
====LOGICAL_OPERATOR====
Logical operators can be used to build more complex expressions.
The logical operators are:
AND
OR
Considerations
  • Two subexpressions joined by a logical operator form a logical expression.
  • Logical expressions resolve to a Boolean value: 1/0 or TRUE/FALSE.
  • Use parentheses--()--to group expressions logically and to join multiple expressions.
  • Parentheses are used in pairs; each open parenthesis "(" requires a closing parenthesis ")".
  • For example:
((<expression1> AND <expression2>) OR (<expression3> AND <expression_4>))


Examples

For a list of examples, see: Using Logical Operators and Brackets