User Tools

Site Tools


transformations:iterate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
transformations:iterate [2016/09/20 23:02] dmitrytransformations:iterate [2021/06/06 20:15] craigt
Line 1: Line 1:
-===== Iterate =====+{{ transformations:IterateAction.png}} 
 +====== ITERATE ====== 
 +Category: Workflow / Internal \\
  
-This transformation calls another project once for each row in a table. Parameters of the called project are assigned using the table's fields.+\\  
 +=====Description===== 
 +This action calls another project once for each row in a table. Parameters of the called project are assigned using the calling table's fields.\\
  
-This transformation is used for arranging loops in EasyMorph.+\\ 
 +=====Use cases===== 
 +//Iterate// is used to create ''FOR…EACH'' and ''FOR…NEXT'' types of loops within EasyMorph. 
 + 
 + 
 +\\  
 +=====Action settings===== 
 +^Setting^Description^ 
 +|Module/Project to run<sup>*</sup>|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 and append results// (and select the Result table from the called module or project).| 
 +|Assign parameters|Select the parameters in the called module (or project) to pass values in with, and the associated columns<sup>*</sup> in the\\ calling dataset that contains the values being passed.| 
 +|When an iteration fails|Select how EasyMorph will handle situations when iterations fail.  Options:  //Halt project// or //Collect errors and continue//\\ (a new column, "Iteration errors", will be created in the dataset to capture any errors that occurred\\ during the iterations).| 
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\ 
 + 
 +\\  
 +=====Remarks===== 
 +Appending the result datasets is similar to the [[transformations:append|Append another table]] action. Columns with the same name are concatenated into one column while columns with unique names are extended with empty cells.\\ 
 + 
 +To create a ''FOR...NEXT'' type of loop, generate a sequence of numbers from 1 to N using the [[transformations:sequence|Sequence]] action, then iterate across the sequence using //Iterate//.\\ 
 + 
 +\\  
 +=====Examples===== 
 +**Iterate** — do not return anything from the iterated module, i.e. just run it one or several times. 
 +{{  https://easymorph.com/images/learn/iterate-mode1.png  }} 
 +\\ \\  
 +**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" action. 
 +{{  https://easymorph.com/images/learn/iterate-mode2.png  }} 
 +\\  
 +=====More examples===== 
 +Read [[http://easymorph.com/learn/iterations.html|Iterations and loops in EasyMorph]] for more details regarding this action. 
 + 
 + 
 +\\  
 +=====See also===== 
 +  * [[transformations:iteratecolumns|Iterate columns]] 
 +  * [[transformations:iteratetable|Iterate table]]
  
-Read [[http://blog.easymorph.com/2015/06/iterations-and-loops-in-easymorph.html|Iterations and loops in EasyMorph]] to understand this transformation. 
transformations/iterate.txt · Last modified: 2023/02/14 17:45 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki