Jump to: navigation, search


Used exclusively with variables of rows, rowsColumn, assignments, pictures, email datatypes, to repeat the execution of commands, for each element in the list parameter
Action returns
Controlling action
gn:act_break is used to stop gn:act_forEach action execution
  1. 35218

Using showProgressDialog and changeProgressDialog may lead to unexpected behavior, please use only if absolutely necessary. Currently there is no global solution for showing UI changes during action execution but there is a ticket where this is planned: ##38048. What was done in scope of this ticket is that we added additional signature to forEach which will internally show progress dialog during iterations. However it comes with some limitations, more information about new signature at wiki.

create zip and attach to ticket wiki :

Action signatures

Full signature

Parameter Description
source source from where the while action is using value as expression parameter
column column name which will be internally added as parameter to source reference names in actions which will be executed in for each action.
[gn:act_getRow]|[@variable/employee_allowedDivisions, @variable/divisionIndex;;@variable/currentDivisionText]
[gn:act_getRow]|[@variable/employee_allowedDivisions(divisionName), @variable/divisionIndex;;@variable/currentDivisionText]
progressDialogMessage(optional) if message is defined then progress bar dialog will appear when for each starts executing. Progress dialog will take source over which for each is iterating. Size of elements in source will represent total number in dialog, while 0 is beginning iteration number. i.e. 4-50 in progress bar would mean 4th element in source is being processed from total of 50 elements

Warning! When using progress dialog forEach must not be called in a trigger which at calling point has more actions that need to be executed after that trigger, those actions will be ignored. In addition, all actions AFTER forEach will be ignored. In order to execute actions after forEach you must define callbackWidgetWhenForEachIterated with callbackWidgetActionSet and put actions that follow there.

progressDialogStyle(optional) defines the progress dialog type. By default it's HORIZONTAL

Can be:

callbackWidgetWhenForEachIterated (optional) target on which is defined callbackWidgetActionSet
  • widgetId
callbackWidgetActionSet (optional) event action set name which will be fired after all iterations of for each loop have been executed
  • hardcoded
ACTIONS list of actions which will be executed continuously until all rows are iterated

Repeat the execution of commands based on list source



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]]

Repeat the execution of commands based on list source with defined column name



@variable/employee_allowedDivisions - list used for iteration
divisionName - column name
[gn:act_getRow]|[@variable/employee_allowedDivisions,@variable/divisionIndex;;@variable/currentDivisionText] - action
[gn:act_forEach]|[@variable/employee_allowedDivisions,divisionName;[gn:act_getRow]|[@variable/employee_allowedDivisions, @variable/divisionIndex;;@variable/currentDivisionText]]

Repeat the execution of commands based on list source with defined column name and progress dialog with actions to post execute



@variable/allEmployeesRows - source
_id - column
@string/progressMessage - progressDialogMessage
HORIZONTAL - progressDialogStyle
@+id/exampleFrame - callbackWidgetWhenForEachIterated
gn:act_set1 - callbackWidgetActionSet
                 [gn:act_showWidgets]|[@+id/lastLoginEmployeesToday_refresh]," />