For Each Text Part

This action splits a text at a specified delimiter pattern and loops through the part, assigning the next text part to a selected variable in each iteration.


The For Each Text Part step action can be configured using the following properties:

The string to split can be specified in several ways using a Value Selector. If the contents of a tag should be split, you must first extract the tag text into a variable using the Extract step action.
Specify the delimiter at which to split the text.

See the example below where we split a text using "," as delimiter.

Specifies the variable in which the text part will be stored in each iteration.
Skip Empty Output:
If checked, the loop will skip iterations whose output would have been a text of length zero. For example if looping over the text "a,b,,c", the loop only contains three iterations (outputting "a", "b" and "c") if this property is checked. If the "Skip Empty Output" property is left unchecked, the loop contains four iterations (outputting "a", "b", "" and "c").


We have the following input text:


We want to iterate over the fruits and perform some action for each; for example store the name of the fruit in a database.

As delimiter, we specify: ,

and as output variable we select

In the first iteration, the variable will contain the value apple, in the second iteration it will contain the value pear. The entire loop will contain six iterations and in the final iteration the variable will contain the value pineapple.