Generate Rows Tool
One Tool Example
Generate Rows has a One Tool Example. Visit Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer.
Use Generate Rows to create new rows of data at the record level. Use this tool to create a sequence of numbers, transactions, or dates.
The Generate Rows tool follows a process to generate rows of data. That process consists of an initial expression (applied to record 1), then a loop expression is applied (such as an increment) that builds subsequent rows, based on a condition (true or false) that ultimately build rows until the condition is false when it terminates the loop.
Connect an Input
An input connection to this tool is optional.
Configure the Tool
- Choose to update an existing field or create a new field.
- Update Existing Field: Assesses the rows coming in and adds new records accordingly. One example is an input that contains a start and an end value where you would like to generate a row for each value in between.
- Create New Field: The tool is configured as an input. If this method is chosen, specify the new Field Name and appropriate Type and Size.
- Specify the Initialization Expression to start the creation of rows. You can enter a value, create an expression, or select the ellipses button to open the Expression Editor.
- Specify the Condition Expression, where the condition is either true or false. If the condition is true, additional rows are generated until the condition equals false. Select the ellipses button to open the Expression Editor.
LOWRANGE <= [HIRANGE]
- Specify the Loop Expression (Usually Increment): This is typically expressed as an increment that generates subsequent rows until the false condition is met. Select the ellipses button to open the Expression Editor.
LOWRANGE + 1
Configure the Condition Expression so row generation ends to preserve hard drive space.
● GenerateRows (5): The value did not change after the Loop Expression.
Adjust your Loop Expression to contain the Field being modified.
Because this tool includes an expression editor, an additional input anchor displays when the tool is used in an app or macro workflow. Use the Interface tools to connect to a Question anchor. Visit Interface Tools for more information.