Page tree
Skip to end of metadata
Go to start of metadata

The For Each action will iterate through items in a list. The list can be specified line by line or separated by another character such as a comma. Note that you can also use this action to iterate through items in a variable or expression.

Note:  Variables which have a Checkbox Select prompt type can contain a comma-delimited list of the select items which can be iterated using this action.

For Each

Name

A friendly name for this action (will be displayed in the actions workflow area).

Enabled

Determines if this action will be run within the relevant stage.

List of Items

The items to be iterated. This field can include expressions. Any expressions will be expanded before the list items are split by the specified separator.

List Item Variable

An existing variable for storing the current item in the iteration. You can use this variable to access the current item in a child action. 


Options

List Item Separator

This is used to split the contents of the List of Items text area into items to iterate. Available options are Comma, Newline (CRLF), Newline (LF), Tab or Custom.

Custom List Item Separator

Enter one or more custom list separator characters. The text will be split on finding ANY of these characters.

Text Delimiters

Specify any character which delimits the list items e.g. the items in "item 1", "item 2", "item 3" are delimited with double quotes.  Available options are None, Double Quotes, Single Quotes or Custom.

Custom Text Delimiters

Specify one or two custom characters as the list item delimiter. If two characters are used then the first character will be the left delimiter and the second character the right delimiter. e.g. () in the text (item 1), (item 2), (item 3).

Write the current list item to the build log for each iteration

Tick this to write the current list item to the build log for each iteration.

Remove delimiters

Tick this to remove any delimiters from list item before setting variable.

Trim spaces

Tick this to remove any spaces from list item before setting variable. Note that spaces outside delimiters are always trimmed.

Skip Blank Entries

Tick this to skip any blank or empty items when iterating the list.


  • No labels