For Each Value

For Each Value activity

This activity runs the contained activities using each specified token value. Learn about tokens this activity produces

Example 1: Sally wants to send an email to each email address in a multi-value field. To accomplish this goal, she retrieves all the email 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 email address.

Example 2: James wants to translate a table (or collection) from a business process form into a lookup table for use later in the workflow. To accomplish this, he has already prepared a lookup table and a lookup table query rule that match the form's table/collection format. The workflow parses through every row of the table using the For Each Value activity and iteration count, which contains a Run Rule activity to insert the values into the table and a Track Tokens activity to move to the next row.

To set up this activity:

  1. Drag the activity from the toolbox pane and drop it in the Designer pane.
  2. In the properties pane, type a name and description of the activity.
    The name and description editors
  3. In the Values property box, type a value in the text box. Click the Token button (right arrow) to add a token.
  4. Optional: Change the order in which the For Each Value activity uses the values using the up-down arrows .
  5. Drag the activities you want performed for each token value from the toolbox pane into the designer pane.
  6. Configure the activities you dragged into this activity. If the activity you have selected accepts tokens, you can use the Current Value token produces within the selected activity.

You may want to disable activities if you only want to test specific sections of your workflow. To disable activities:

  1. Select an activity in the designer pane to highlight it.
  2. In the Description property box, clear Enable.

For an example that uses this feature across process automation, see the Migrating Laserfiche Form Tables into Microsoft Word Documents whitepaper.