Actions
An action specifies the output from a rule statement. An action generates an output value when the condition in the rule statement validates an input value.
You can configure an action to generate an output in the following ways:
- •The action can return a data value that you specify.
- •The action can return a value from an input in the rule set.
- •The action can apply a function to the input data.
Types of Actions
When you configure an action, you specify the data that the rule statement returns when the operator validates the input data on the condition.
Configure an action to generate an output in one of the following ways:
- Return a value that you enter.
- Configure an action to return a data value that you specify.
- For example, you might configure an action to return the word VALID when the input data matches a reference data value.
- Replace an input with another input.
- Configure an action to return a data value from another input in place of the current input. The action reads the data value on the corresponding row of the input that you select.
- For example, a business might define a rule that requires all product records to use Quick Response (QR) codes in place of bar codes. You configure an action to replace an input column of bar code values with a corresponding column of QR code values.
- Return a value from a reference table.
- Configure an action to return a data value from a reference table. The action compares the input data to the values in the reference table that you specify. If the action finds the input data in the reference table, the action returns a reference data value that corresponds to the input data.
- For example, you might configure an action to compare first name data to a reference table that identifies the gender of the first name. The action might return the word "MALE" as the output when the word "JOHN" is the input. The action might read the word "JOHN" and return the word "MALE" as the output.
- Remove data values from the input data.
- Configure an action to remove a data value that you specify.
- For example, the input data might include product terms that the business no longer uses. Configure the action to return a version of the input data that omits the product terms.
- Remove reference data values from the input data.
- Configure an action to delete reference data values from an input.
- The action compares the input data to the values in the reference table that you specify. If the action finds an input data value in the reference table, the action deletes the value from the input data. The action returns the edited version of the input data as output.
- For example, you might configure an action to compare an input string to a reference table of salutation terms. The action might read the input string "MR JOHN SMITH" and return the string "JOHN SMITH" as the output.
- Remove character spaces from the input data.
- Configure an action to delete character spaces from the input data. Remove character spaces when the input data includes redundant character spaces.
- For example, you might configure an action to remove character spaces from the following telephone number:
212 555 1234
- Use a function to determine the output value.
- Configure an action to apply an expression to the input data.
- For example, you might configure the action to return the character length of the input data.
- Merge values from multiple inputs.
- Configure an action to merge data from two or more inputs.
- For example, you might configure an action to merge a column of first name data and a column of second name data. The action returns a single field that contains the first name and second name.
- Change the character case of the input data.
- Configure an action to convert the character case of an input that you select.
- For example, a rule statement might read a data set that stores data values in sentence case. Configure an action to return the data in uppercase.
Action Configuration Options
When you configure an action, you specify a data value that the rule statement can return as an output for the rule set. You can specify a data value, or you define an expression to generate the output.
You can enter the data value in the rule statement, or you can select an input as the source of the data values. You define the expression in a configuration dialog box that you open from the rule statement.
Enter a data value to the action
To enter a data value, select a data type from the action options in the rule statement.
You can select the following data types:
Enter the data value to the rule statement in the rule set properties view.
Note: You can specify a date/time data type and select a date/time input when you configure an expression in the action.
Add an input to the action
To use an input as the source of the output data, select the input option from the action options in the rule statement. Then, select the input name from the action options.
Apply an expression to the action
To configure an expression, select the function option from the action menu. When you select the field, you open the Define Action dialog box.
The following image shows the Define Action dialog box:
- 1. Input options.
- 2. Function options.
- 3. Standardization options.
- 4. Merge options.
- 5. Case conversion options.
- 6. Editable fields for the option that you select.
To define an expression, select Functions. You can also define operations to standardize data values, merge data values, and change the character case of data values.