Building conditions
Updated in 2024
You build conditions using the Condition window.
To build a condition:
-
Select the condition type in the navigation pane on the left side of the Condition dialog box. The following condition types are available:
-
Standard - This type allows you to check the state of a field or macro, or compare it with another field or value. A number of operators, such as equals and is not blank, are available. Click here to view examples.
-
Compare Two Date Fields - This type allows you to compare two dates. Click here to view examples.
-
SQL Criterion - This type provides a free-form text field where you can enter a SQL expression in the form of a SQL WHERE clause. The expression must return a TRUE or FALSE value. Use this condition type when you need to specify a complicated criterion that you can't do with the standard type. Click here to view examples.
-
Create a condition of the chosen type:
-
Click OK.\
TIP: You can modify workflow parameters on the fly when configuring a workflow item or component or modifying Templates for Self Service Portal notifications. To open the Workflow Parameter window, right-click the selected placeholder and choose Placeholder Definition.
Handling empty and non-empty values in workflows
When creating workflows, comparing empty and non-empty values can lead to several issues if not handled correctly:
-
Using operators like does not equal without considering blank values can result in incomplete filtering. For example, a condition meant to exclude a specific status will not consider records where the status field is blank, leading to incomplete results.
-
Blank or null values might be unintentionally excluded when using operators that do not account for them. As a result, important records can be missed in the workflow.
-
Misunderstanding how operators handle empty values can lead to logic errors in workflows, causing unexpected behaviors or results.
To address these issues and improve clarity around comparing empty and non-empty values, a tooltip will appear when selecting the does not equal or does not contain/begin with/end with operators. The tooltip explains that these operators yield positive results only when the field value is not blank (not null).
To properly manage potential blank values and ensure that all relevant records are considered, it is recommended to use an additional condition with the is blank operator. To illustrate how it works, consider the following example.
Example of using the "is blank" operator
You need to filter records based on a status field. You want to include records where the status does not equal "Closed" and also handle cases where the status might be blank. You then create the following condition:
- Field: Status
- Operator: Does not equal
- Value: "Closed"
The tooltip will inform you that this condition will not yield a positive result if the status field is blank. To address potential issues, add another condition using an OR logic:
- Field: Status
- Operator: Is blank
This will ensure that the workflow correctly includes records where the status is not "Closed" and accounts for any blank status values.