For Each Value

This activity runs the activities inside it on token values that have been returned or generated by a previous activity in your workflow definition. See the token this activity produces.

Example: Sally wants to send an e-mail to each e-mail address in a multi-value field. To accomplish this goal, she retrieves all the e-mail addresses in the Email Address field using the Retrieve Field Values activity. She adds the Email Address field value token from the Retrieve Field Values activity to the For Each Value activity, and she places an Email activity inside the For Each Value activity. The Email activity uses the Current Value token as the e-mail address.

ClosedHow does this activity look in the Designer Pane? 

To add this activity to a workflow definition

To configure this activity

Drag and drop the activities to perform on each value into this activity.

Select the activity in the Designer Pane to configure the following property boxes in the Properties Pane.

Tokens for For Each Value

The For Each Value activity produces the following token, which is available to activities contained within this activity. The For Each Value activity runs one time per value. Each time it runs, the token value reflects the information relevant to the value it is currently processing.

Name Description Sample Syntax*
Current Value The current value of the token specified in the For Each Value activity. %(ForEachValue_Current Value)
Iteration The number of times the For Each Value activity has run. %(ForEachValue_Iteration)

*The "ForEachValue" portion of the syntax changes to match the activity's name as specified in the Activity Name property box. Note that all non-alphanumeric characters, except underscores, are removed from the name. For example, if you rename the activity Process [for Each], the syntax for the Current Value token will be %(ProcessforEach_Current Value).