Dynamic Replace Tool
The Dynamic Replace tool allows the user to quickly replace data values on a series of fields, based on a condition. The data replacement can be based on formulas or static values.
Say you have a hundred different incoming fields and instead of the actual value in each field, you want to represent the number with a code of A, B, C, D, etc. that represents a range. The Dynamic Replace tool can easily perform this task.
Inputs
D anchor: The Data stream to be modified.
R anchor: The Replacement data stream, which contains three columns used to configure the tool.
Configure the tool
Field Name Field: Select a column from the R data stream that contains field names from the D data stream.
Boolean Expression Field: Select a column from the R data stream that contains an expression that is used to evaluate the data from the D data stream. The Boolean Expression field can accept any value other than zero.
Expressions are evaluated in sequence and stop at the first match; therefore, an expression does not need to check for both ends of a range, but does need to be in ascending order if evaluating a series of ranges.
Use _CurrentField_ to refer to the Field Name Field that is currently being processed if an expression is used for more than one column.
Output Value Field: Select a column from the R data stream that contains replacement data. The column can contain static values or expressions that act on the data from the D data stream.
- Values are Expressions/Formulas: Select if the column selected for Output Value Field contains expressions to have the expression act on the data from the D data stream.
Warn/Error on Unmatched Data Fields: Select the intended behavior for unmatched data. Choices include:
- Allow unmatched data fields: Unmatched data fields are replaced with [Null] values. No message is reported in the Results window.
- Warn on unmatched data fields: Unmatched data fields are replaced with [Null] values. A Warning message is reported in the Results window for each unmatched field.
- Error on unmatched data fields: An error is thrown for the first unmatched data field and the workflow run stops.
Outputs
O anchor: The Output data stream containing replacement data.
S anchor: The Summary of replacements, including counts of each replaced field name and output value combinations.