Search filters allow you to refine your search in order to locate directory objects based on the properties (attributes) of the objects. You can use a search filter to look for specific values in the object properties, thereby ensuring that the search results contain only the objects with the desired properties.
A search filter is composed of conditions combined using AND or OR logic. Each condition is a certain statement that specifies the criteria the activity must use to determine whether a specific object is to be included in the search results. The Workflow Designer provides a condition builder for configuring filter conditions, located in the “Search” Activity Properties > Scope and filter > Search options setting when selecting a Search activity.
When you configure a search filter, you need to add at least one condition. By default, a single, implied condition group is created when you add a filter condition. You can create additional condition groups to group a set of conditions and nest grouped conditions within other condition groups.
A condition group contains one or more conditions connected by the same logical operator. By grouping conditions, you specify that those conditions should be evaluated as a single unit. The effect is the same as if you put parentheses around an expression in a mathematical equation or logic statement.
To add a condition to a condition group
-
In the Search options box, under Filter, click the name of the condition group and then click Insert condition.
Click the plus sign (+) next to the name of the condition group.
You can remove a condition, if needed, by clicking X on the right side of the list item representing the condition in the Conditions box.
To add a condition group into another condition group
-
In the Conditions box, click the name of the condition group, point to Insert condition group, and then click an option to specify the logical operator:
-
AND group: The condition group evaluates to TRUE if all conditions in the group are TRUE.
-
OR group: The condition group evaluates to TRUE if any condition in the group is TRUE.
-
NOT AND group: The condition group evaluates to TRUE if any condition in the group evaluates to FALSE.
-
NOT OR group: The condition group evaluates to TRUE if all conditions in the group evaluate to FALSE.
-
By default, AND is the logical operator between the conditions in a condition group. It is possible to change the logical operator by converting the condition group to a different group type: Click the name of the group, point to Convert condition group to, and then click the option appropriate to the desired logical operator.
You can remove an entire condition group, if needed, by clicking the name of the group and then clicking Delete condition group.
Once you have added a condition to a condition group, you can use the following steps to configure the condition.
To configure a condition
-
Click Configure condition to evaluate, and then choose the property you want the condition to evaluate.
-
Click the current comparison operator, if needed, and then click the operator you want the condition to use.
By default, a condition is configured to use the equals operator. The list of operators that are available depends upon the property you originally selected.
-
Click Define value to compare to, and then choose an option to specify the desired comparison value. The following options are available:
Option |
Description |
Text string |
A literal string of characters. You can type the desired string when you configure a filter condition. |
Property of workflow target object |
The value of a certain property of the target object of the request that started the workflow. You can select the desired property when you configure a filter condition. Normally, this should be a string-value property. |
Property of workflow initiator |
The value of a certain property of the user whose request started the workflow. You can select the desired property when you configure a filter condition. Normally, this should be a string-value property. |
Changed value of workflow target object property |
The value that is requested to be assigned to a certain property of the target object of the request that started the workflow, which represents the requested change to the property of the target object. You can select the desired property when you configure a filter condition. Normally, this should be a string-value property. |
Property of object from workflow data context |
The value of a certain property of the object that will be selected by the Search activity on the basis of the data found in the workflow environment at the time of executing the workflow. When you configure a filter condition in a Search activity, you can choose the desired property and specify which object you want the activity to select upon evaluating the condition at workflow run time. |
Value generated by rule expression |
The string value of a certain rule expression. By using a rule expression you can compose a string value based on properties of various objects found in the workflow environment at the time of executing the workflow. |
Fixed object in directory |
A certain object, such as a user, group, or computer. You can select the desired object in Active Directory when you configure a filter condition. This comparison value is applicable to filter conditions for DN-value properties. |
Object from workflow data context |
The object that will be selected by the Search activity on the basis of the data found in the workflow environment at the time of running the workflow. When you configure a filter condition in a Search activity, you can specify which object you want the activity to select upon evaluating the condition at workflow run time. This comparison value is applicable to filter conditions for DN-value properties. |
Object identified by DN-value rule expression |
The object whose Distinguished Name (DN) is specified by the string value of a certain rule expression. By using a rule expression, you can compose a string value based on properties of various objects found in the workflow environment at the time of running the workflow. You can create the desired rule expression when you configure a filter condition. This comparison value is applicable to filter conditions for DN-value properties. |
Object identified by workflow parameter |
The object specified by the value of a certain parameter. You can choose the desired parameter when you configure a filter condition. This comparison value is applicable to filter conditions for DN-value properties. |
Workflow initiator object |
The user account of the user whose request started the workflow. This comparison value is applicable to filter conditions for DN-value properties. |
Workflow target object |
The target object of the request that started the workflow. This comparison value is applicable to filter conditions for DN-value properties. |
Fixed date and time |
A literal date and time value. You can choose the desired date and time when you configure a filter condition. This comparison value is applicable to filter conditions for Date/Time-value properties. |
Workflow date and time |
A certain point in time relative to the date and time of the Search activity run. You have the option to specify a date that occurs a particular number of days before or after the Search activity run. This comparison value is applicable to filter conditions for Date/Time-value properties. |
True |
The literal Boolean value of True. |
False |
The literal Boolean value of False. |
Value generated by script |
The value returned by a certain script function. You can choose the desired script function when you configure a filter condition. The Search activity will run that script function upon evaluating the condition at workflow run time. |
Workflow parameter value |
The value of a certain workflow parameter. You can choose the desired parameter when you configure a filter condition. |