User Tools

Site Tools


transformations:iterateprogram

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
transformations:iterateprogram [2018/05/23 23:05] dmitrytransformations:iterateprogram [2021/07/19 02:00] (current) – [Examples] craigt
Line 1: Line 1:
-===== Iterate external program =====+{{ transformations:IterateProgramAction.png}} 
 +====== ITERATE PROGRAM ====== 
 +Category: Workflow / External\\
  
-Run specified external application once for every line of table.+\\  
 +=====Description===== 
 +This action runs the specified external application once for every line in the table.
  
-The transformation fails if the exеrnal application returns a non-zero exit code.+The action fails if the extеrnal application returns a non-zero exit code.
  
-===Use cases=== +\\ 
-  * Run external applications (e.g. after a file is generated by EasyMorph) against a list of parameters generated in EasyMorph +=====Use cases===== 
-  * Execute Windows shell commands (copy, del, ren, etc.) for a list of files generated in EasyMorph (e.g. using [[transformations:filelist|File list]] transformation+  * Run external applications (e.g. after a file is generated by EasyMorph) against a list of parameters generated in EasyMorph. 
-  * Run another EasyMorph project in order generate different reports for each line of the table (e.g. one report per country)+  * Execute Windows shell commands (copy, del, ren, etc.) for a list of files generated in EasyMorph (e.g. using [[transformations:filelist|File list]] action). 
 +  * Run another EasyMorph project in order to generate different reports for each line of the table (e.g. one report per country)
 +\\  
 +=====Action settings===== 
 +^ Setting  ^ Description 
 +|Application<sup>*</sup>|Enter or browse to the fully qualified path and filename of the program's executable file.  If this is left blank,\\ the command line is executed by the Windows shell (cmd.exe).| 
 +|Working directory (optional)<sup>*</sup>|Enter the folder containing any files required by the application.|   
 +|Arguments|Enter the values, filenames, commands, etc. passed to the application as a calculated expression.| 
 +|Halt if exit code is not 0|When this is checked, the workflow will stop and display an error if the program terminates with an error.| 
 +<sup>*</sup> Setting can be specified using a [[:parameters|parameter]].\\ 
 + 
 +\\  
 +=====Remarks===== 
 + 
 +====Parameter substitution==== 
 +The action uses a calculated expression to create its command line. It is possible to insert [[:parameters]] as well as column names into the expression. 
 + 
 + “copy /Y “ & {SourceFolder} & [Filename] & “ “ & {DestinationFolder} & [Filename] 
 + 
 +Note that //SourceFolder// and //DestinationFolder// are parameter names, while [Filename] is a table column. 
 + 
 +\\ 
 +=====Examples===== 
 +**Example:**  Batch-delete files using the Windows "del" shell command.  The fully qualified filenames are stored in the "File name with full path" column in the dataset. 
 + 
 +**Action parameters:** 
 +> Application is left blank (command will run as a Windows shell command) 
 +> Working directory is left blank (no folder assignment is necessary for this command) 
 +> Calculated argument '' 'del /q "' & [File name with full path] & '"' '' 
 +> Halt if exit code is not 0 is checked (the workflow will stop with an error the "del" command does not complete correctly) 
 + 
 +{{  https://easymorph.com/images/learn/iterate-program.png  }} 
 + 
 +\\  
 +=====See also===== 
 + 
 +  * [[transformations:runprogram|Run program]] 
 +  * [[https://easymorph.com/learn/external-programs.html|Tutorial:Executing external programs]]
  
-===See also=== 
-[[https://easymorph.com/learn/external-programs.html|Tutorial:Executing external programs]] 
transformations/iterateprogram.1527131124.txt.gz · Last modified: 2018/05/23 23:05 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki