Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
transformations:iterate [2021/06/06 20:15] – craigt | transformations:iterate [2021/07/18 02:19] – craigt |
---|
\\ | \\ |
=====Use cases===== | =====Use cases===== |
//Iterate// is used to create ''FOR…EACH'' and ''FOR…NEXT'' types of loops within EasyMorph. | //Iterate// is used to create "FOR…EACH" and "FOR…NEXT" types of loops within EasyMorph. |
| |
| |
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.\\ | 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//.\\ | 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//.\\ |
| |
\\ | \\ |
**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. | **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 }} | {{ 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. | |
| |
| \\ |
| ====Community examples==== |
| * [[https://community.easymorph.com/t//466/1|Sending an email notification when project fails]] ([[https://community.easymorph.com/uploads/short-url/8MVDPxoPY14RwNbwTFKOzYgrbCD.morph|Project]]; Module: //Main//; Group: //The "Skip" action//; Table: //Example 2//; Action position: //3//) |
| * [[https://community.easymorph.com/t//1766/1|Load only workbooks with given number of sheets]] ([[https://community.easymorph.com/uploads/short-url/AbWPlfPVBecqgZUBVTYlljwb9NO.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Get file names to load//;\\ Action position: //3//) |
| * [[https://community.easymorph.com/t//2004/4|Get Date from Year, Week and Day of Week]] ([[https://community.easymorph.com/uploads/short-url/7ERZplXAq4auZQqPk8cli327Dgv.morph|Project]]; Module: //Module 1//; Group: //Tab 1//; Table: //Table 1//; Action position: //2//) |
| * [[https://community.easymorph.com/t//2156/1|How to process parent-child data structures]] ([[https://community.easymorph.com/uploads/short-url/zmylfn4Qr0ovzu3e5rybl0LVMNG.morph|Project]]; Module: //Get subfolders//; Group: //Tab 1//; Table: //Table 1//; Action position: //2//) |
| |
\\ | \\ |
=====See also===== | =====See also===== |
* [[transformations:iteratecolumns|Iterate columns]] | * [[transformations:iteratecolumn|Iterate column]] |
* [[transformations:iteratetable|Iterate table]] | * [[transformations:iteratetable|Iterate table]] |
| * Read [[http://easymorph.com/learn/iterations.html|Iterations and loops in EasyMorph]] for more details regarding this action. |
| |