For Each Row
This activity runs the activities inside it on each row returned by the Custom Query and Query Data activities or on each result returned by activities that return collections of information, such as Search Repository, Find Entries, Find Manager, Find Group, Retrieve Laserfiche Forms Content, and Verify PDF Signatures.
Note: When using SELECT queries in the Custom Query activity, you must test the query in order to make the columns accessible as tokens to this activity.
How does this activity look in the Designer Pane?
- Drag it from the Toolbox Pane and drop it in the Designer Pane.
To configure this activity
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
- Add an activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
- Select the activity in the Designer Pane.
- Under Activity Name in the Properties Pane, replace the default name.
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
- Add an activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
- Select the activity in the Designer Pane.
- Under Activity Description in the Properties Pane, replace the default description.
-
Get Rows From
The For Each Row activity can dynamically interact with rows found with activities that return collections of information such as the Custom Query, Query Data, Search Repository, Find Entries, Find Manager, Find Group, Retrieve Laserfiche Forms Content, and Verify PDF Signatures activities.
To select which collection of information the activity will be performed on
- Add the For Each Row activity to your workflow by dragging it from the Toolbox Pane and dropping it in the Designer Pane.
- Select the activity in the Designer Pane.
- Under Get Rows From in the Properties Pane, click Select.
- In the Select Collection dialog box, expand the activity that finds the collection of information you want to use with the For Each Row activity.
- Click the green arrow next to the collection of rows you want this activity to use.
- Click OK.
Note: You can only select collections of information from activities that appear above the activity you are currently configuring in the Designer Pane.
Tokens for For Each Row
If you have a Custom Query activity that uses a SELECT query and you test the query first, the activity creates one token per column in the database table. These tokens are available to activities inside the For Each Row. The For Each Row activity runs one time per row in the column. Each time it runs, the token value reflects the information relevant to the row it is currently processing.
Name | Description | Sample Syntax* |
---|---|---|
Column Name | A token is created for each column in the database table. The token name is the same as the column name. The token's value is the value in the Column Name column of the current row. | %(ForEachRow_Column Name) |
Iteration | The number of times the For Each Row activity has run. | %(ForEachRow_Iteration) |
*The "ForEachRow" 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 [Rows], the syntax for the column named "Addresses" token will be %(ProcessRows_Adddresses).