From wiki.ginstr.com
Jump to: navigation, search
(Created page with "<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> <span STYLE="font-size: xx-large"><code>gn:act_forEach</code></span> Category:Action_Library ;Descr...")
 
Line 3: Line 3:
 
[[Category:Action_Library]]
 
[[Category:Action_Library]]
  
;Description: Used exclusively with [[Variables]] of [[Datatypes#rows|rows]], [[Datatypes#rowsColumn|rowsColumn]], [[Datatypes#pictures|pictures]], [[Datatypes#email|email]] DT, to repeat the execution of commands, for each element in the list parameter
+
;Description: Used exclusively with <code>[[Variables]]</code> of <code>[[Datatypes#rows|rows]]</code>, <code>[[Datatypes#rowsColumn|rowsColumn]]</code>, <code>[[Datatypes#pictures|pictures]]</code>, <code>[[Datatypes#email|email]]</code> datatypes, to repeat the execution of commands, for each element in the list parameter
  
 
;Action returns: void
 
;Action returns: void
Line 31: Line 31:
  
 
====Example====
 
====Example====
<code>variable/listId</code> - [[source]] [[Datatypes#rows|rows]] used for iteration<br>
+
<code>variable/listId</code> - list used for iteration<br>
 
<code>variable/listId(rowColumnName1)</code> - retrieving value from rowColumnName1 column of iterated row<br><br>
 
<code>variable/listId(rowColumnName1)</code> - retrieving value from rowColumnName1 column of iterated row<br><br>
<syntaxhighlight lang="java">
+
<code>[gn:act_forEach]|[variable/listId;[gn:act_rawWriteValues]|[tableId;column1,column2;variable/listId(rowColumnName1),+id/listRow]]
[gn:act_forEach]|[variable/listId;
+
</code>
  [gn:act_rawWriteValues]|[tableId;column1,column2,...;variable/listId(rowColumnName1),+id/listId(rowColumnName2),...]
 
]
 
</syntaxhighlight>
 
 
<hr>
 
<hr>

Revision as of 10:54, 15 March 2017

gn:act_forEach

Description
Used exclusively with Variables of rows, rowsColumn, pictures, email datatypes, to repeat the execution of commands, for each element in the list parameter
Action returns
void

Action signatures

Repeat the execution of commands based on value

[gn:act_forEach]|[source;ACTIONS]
Parameter Description
source source from where the while action is using value as expression parameter
ACTIONS list of actions which will be executed continuously until all rows are iterated

Example

variable/listId - list used for iteration
variable/listId(rowColumnName1) - retrieving value from rowColumnName1 column of iterated row

[gn:act_forEach]|[variable/listId;[gn:act_rawWriteValues]|[tableId;column1,column2;variable/listId(rowColumnName1),+id/listRow]]