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.
D anchor: The Data stream to be modified.
R anchor: The Replacement data stream, which contains three columns used to 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.
Because this tool replaces column values, the column's data type may need to be updated.
Autofield Field Types: Designer sets the data type to accommodate all contained data.
Keep Original Field Types: The original field type is maintained. If the field type is incompatible for the replacement data, an error or conversion error occurs.
Change Field Types to: Manually set the field type and size. If the field type is incompatible for the replacement data, an error or conversion error occurs.
The size parameter is ignored if the data type does not require a size, such as a spatial object.
Warn/Error on Unmatched Data Fields: Select the intended behavior for unmatched data. Choices include:
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.
©2018 Alteryx, Inc., all rights reserved. Allocate®, Alteryx®, Guzzler®, and Solocast® are registered trademarks of Alteryx, Inc.