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.
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.
How do I insert a variable to the value field?
Do one of the following to insert the variable using the Insert Reference pane or Advanced Lookup:
- Click Advanced Lookup, select Workflow Variables, List Lookup or Workflow Context from the drop-down list that appears, and then select a variable from the corresponding drop down and click Insert.
- 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.
- Click on the field and from the Insert Reference pane that appears on the right, double-click on a variable.
Item Properties
|
Metadata columns for the item the workflow is associated with. Available only for list workflows.
|
Workflow Context
|
Context variables that represent data related to the current workflow instance, such as current item or site URL and workflow name.
- Current item URL: The URL of the item the workflow is associated item. Available only for list workflow actions.
- Current site URL: The URL of the site the workflow is associated site.
- Initiator login name: The login name of the person who started the workflow instance.
- Initiator display name: The display name of the person who started the workflow instance.
- Initiator email address: The email address of the person who started the workflow instance.
- Instance ID: The unique identifier of the workflow instance.
- List ID: The unique identifier of the list the workflow is associated with. Available only for list workflow actions.
- List Name: The name of the list the workflow is associated with. Available only for list workflow actions.
- Manager login name: The login name of the manager of the initiator (the person who started the workflow instance).
- Manager display name: The display name of the manager of the initiator (the person who started the workflow instance).
- Manager email address: The email address of the manager of the initiator (the person who started the workflow instance).
- Publish user: The person who published the workflow.
- Workflow name: The name of the executing workflow.
|
Workflow Variables
|
Workflow variables configured for the workflow. |
|
For more information about how to use Lookups in configuration fields, see
Lookups in action configuration fields.