For Each User

This activity runs the activities inside it for each user in the specified group. You can return groups for this activity to use with a Find Group or Find Manager activity. See the tokens this activity produces.

Example: Every month, each person in the Sales Group needs to fill out a form to register for that month’s corporate sales event. On a monthly schedule, Workflow uses a For Each User activity to make a copy of that month’s form for each user in the Sales Group. It fills out part of the form with their individual information and e-mails them a personalized copy of the form for them to complete.

To add this activity to a workflow definition 

To configure this activity

  1. Drag and drop activities into this activity.

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

  • Activity Name

    Once added to a workflow definition, the default name of an activity can be changed. Providing a custom name for an activity helps you remember the role it plays.

    To name an activity

    1. Add an activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under Activity Name in the Properties Pane, replace the default name.
    4. Note: Activity names cannot be the same as any other activity name in the workflow, they cannot be the same as the workflow's name, they must be less than 100 characters, they must contain at least one alphanumeric character, they cannot be "Name," and they cannot be the same as the activity's runtime type (which is usually only an issue with custom activities).

  • Activity Description

    Use the Activity Description to provide descriptive text to help you remember the role that the activity plays in the workflow. All activities contain a default description that you can modify while constructing your workflow.

    To modify an activity description

    1. Add an activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under ClosedActivity Description in the Properties Pane, replace the default description.
  • Get Users From

    The For Each User activity can dynamically interact with groups found with the Route Entry to Group, Find Group, or Find Manager activities.

    To select which group the activity will run on

    1. Add the For Each User activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under Get Users From in the Properties Pane, click Select.
    4. In the Select User dialog box, expand the activity that finds the group or users you want to use with the For Each User activity.
    5. Click the green arrow next to the group or users you want to use.
    6. Note: You can only select groups from activities that appear above the activity you are currently configuring in the Designer Pane.

    7. Click OK.
  • Folder Validation

    This property box determines if users without a default folder or Working Folder will be skipped in the For Each User activity. More information.

    To configure Folder Validation

    1. Add the For Each User activity to your workflow definition by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
    2. Select the activity in the Designer Pane.
    3. Under Folder Validation in the Properties Pane, select the check box to skip users who do not have a default folder or Working Folder specified.

Tokens for For Each User

The For Each User activity produces the following tokens, which are available to activities placed inside it. The For Each User activity runs one time per user, group, or manager. Each time it runs, the token values reflect the information relevant to the user it is currently processing.

Note: If a user's Display Name is not set, the value for the user's Account Name is used for the Current User_Display Name token instead.

Name Description Sample Syntax*
Current User_Id The current user's ID. %(ForEachUser_Current User_Id)
Current User_Display Name The current user's Display Name. %(ForEachUser_Current User_Display Name)
Current User_Account Name The current user's Account Name. %(ForEachUser_Current User_Account Name)
Current User_E-mail The current user's e-mail address. %(ForEachUser_Current User_E-mail)
Current User_Is Group Whether the current user is a group. This token can have one of two values: True or False. %(ForEachUser_Current User_Is Group)
Current User_Qualified Name The current user's unique identifying name. %(ForEachUser_Current User_Qualified Name)
Current User_Working Folder The current user's working folder. The working folder is the user's folder specified in the Find User, Find Group or Find Manager Folder Token Settings property box. If no folder is specified in this property box than the working folder is the default folder. %(ForEachUser_Current User_Working Folder)
Current User_Default Folder The current user's default folder. %(ForEachUser_Current User_Default Folder)
Current User_Managers E-mail The e-mail address(es) of the current user's manager(s). If the current user has more than one manager, their e-mails will be listed in a multi-value token. %(ForEachUser_Current User_Managers E-mail)
Iteration The number of times the For Each User activity has run. %(ForEachUser_Iteration)

*The "ForEachUser" 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 Distribute-to-User, the syntax for the Current User_Id token will be %(DistributetoUser_Current User_Id).