Filter

Terminates the workflow if the expression evaluates to FALSE; continues the workflow if the expression evaluates to TRUE.

The following message is logged to workflow history when the workflow terminates because the expression evaluates to FALSE: "The item under workflow did not meet the filter criteria."

You can terminate the workflow with one action instead of multiple actions (such as using Run if and Terminate Current Workflow). With Filter, you simply specify the conditions that must be met for the workflow to continue. If the conditions are not met, the workflow is terminated.

Scenarios where you might want to use this action:

  • Handle specified content types only. Start a workflow whenever a list item is created, but terminate the workflow instance if the list item is not one of the specified content types.
  • Check for prerequisite reviews. Start a workflow whenever a list item is modified, but terminate the workflow instance if prerequisite reviews have not yet been completed. For example, add a Filter action for each prerequisite review, perhaps handled by the values IT, Marketing, and Finance in a Choice column on the list. Each time a list item is modified, the workflow checks for each Choice value before proceeding. Only when all values (IT, Marketing, and Finance) exist will the remaining parts of the workflow be run.

Action settings

Do one of the following to open the Action configuration window:

  • Double-click the action.
  • Click on the action and then click Configure.

See Action configuration window for more information.

Field Description
Expression

Includes one or more conditions which are evaluated to get the expression result.

Define one or many conditions by filling the following condition fields:

When: The variable or value to use for the condition. Select one of the following from the drop-down list and then select an item or specify a value in the adjoining field.

  • Value: Select to specify a value and type the value in the adjoining field.
  • List Lookup: Reference a property of an item in the current site.
  • Workflow Context: Select a context variable specific to the workflow.
  • Workflow Variables: Select a workflow variable.

Operator (unlabeled field): Select an operator to apply for the condition.

Value (unlabeled field): The text or variable that the operator compares with what is selected in the When field. You can insert a variable or type the value.

For more information about how to use Lookups in configuration fields, see Lookups in action configuration fields.