Table of Contents
ITERATE TABLE
Category: Workflow / Internal
Description
This action is similar to Iterate action but allows passing a table to an iterated project. Iterate table has two inputs:
- The output of the previous action
- The external table passed into the called module/project (referenced in the Action settings)
This action works as follows: It takes a dataset from another table (input #2, above), passes it to the called module or project, and runs it as many times as there are rows in the input dataset (input #1, above).
The iterated module/project should use the Input action to receive the external table.
Use cases
This action is helpful when multiple calculations with different parameters have to be performed on the same dataset (e.g. financial stress testing).
Action settings
Setting | Description |
---|---|
Other table | Select the table from the current project that will be passed into the called module (or project). |
Module/Project to run* | Select whether to call a module (within the current project), or an external project (.morph file), then select the module, or browse to the project file. |
Iteration mode | Choose whether to just iterate the called module (or project) and not return any results, or iterate and return a dataset. Options: Iterate or Iterate, append results (and select the Result table from the called module or project). |
Assign parameters | Select the parameter(s) in the called module (or project) to pass values in through, and enter the associated value(s)* (can be a column, text/number, or parameter). |
* Setting can be specified using a parameter.
Remarks
This action provides significantly increased performance in cases when the iterated project needs to operate with the same dataset in each iteration.
Examples
Mode: Iterate — do not return anything from the iterated module, i.e. just run it one or several times. (top image, below)
Mode: Iterate and append results — run the module one or several times, return a table (the result dataset) from each iteration, and append all result datasets into one, which becomes the output of the "Iterate table" action. (bottom image, above)
Community examples
- Create a new table with columns based on row values (Project; Module: Main; Group: Tab 1; Table: Table 1; Action position: 4)
- Match action - matching multiple values (Project; Module: Main; Group: Tab 1; Table: All matches; Action position: 2)
- “Printed” Text File: Could EasyMorph import this? (Project; Module: Main; Group: Tab 1; Table: TIMESHEET.txt (2); Action position: 4)
- Create a new table with columns based on row values (Project; Module: Main; Group: Tab 1; Table: Table 1; Action position: 4)
See also
- Read Iterations and loops in EasyMorph for more details regarding this action.