Identifying data values that contain key terms or character strings
Identifying data values that contain key terms or character strings
To find a word or a character string in a column of input data, configure a condition to use the "contains" operator. You might use the operator to find a single data value when each field in the input contains multiple values. Or, you might use the operator to find input data values that contain a character string within a longer string.
For example, you might work for an organization that stores inventory items in a warehouse. You want to measure the number of items in inventory for a range of products. The product names are West Wood, West Star, and West Land. You design a condition to find product names that contain the string "West."
The rule statement that you configure might represent a single element in a business rule. For example, the business rule might describe a policy to reduce the sale price of products that spend a long time in inventory. The current rule statement generates an output that a rule statement in a parent rule set can read as an input.
Select a rule set in a rule specification.
In the rule set properties, click
Rule Logic
.
Click
Add Rule Statement
.
Select an input for the rule statement.
If the rule specification does not contain an input that you can use, create an input. Configure the input properties to represent the type of column that contains the business data.
Select an operator to validate the results of the condition analysis.
When you use the
contains
operator, the rule statement prompts you to use the
function
condition type.
In the
Define Condition
dialog box, select Contains.
Enter the value to compare to the input data in the Input field. For example, enter "West."
The function searches the rule statement input for the string value that you enter.
By default, the function looks for the value anywhere in the input string. You can also configure the function to look for the value at the start or at the end of the input string.
You can also configure the Contains function to compare the condition input to a value on another input.
Select the type of action to apply to the data that satisfies the condition logic. For example, you might configure an action that returns the inventory numbers for each product.
To return the data values from another column on the same row, select the following action type:
input
Select the input that represents the inventory levels for each product in the warehouse.