SharePoint Designer 2013 workflow loop basics

Learn the basics of the 'Loop n Times' and 'Loop with Condition' loop in a SharePoint Designer workflow and get examples of how to use them.

ADVERTISEMENTS

SharePoint Designer 2013 comes with the following workflow loops you can use to iterate through workflow actions:

To be able to use a loop in a SharePoint Designer workflow, you must select the SharePoint 2013 Workflow platform when you create a SharePoint Designer workflow.

Loop n Times

The Loop n Times workflow loop can be used to iterate a specified amount of times through a group of workflow actions. The amount of times can be static (specified when you create the workflow) or dynamic (retrieved from the value of a data source or workflow variable).

When you add this workflow loop to a SharePoint workflow, the following sentence is displayed:

The contents of this loop will run 1 times

To specify the amount of times the loop should run:

Examples of using the Loop n Times workflow loop:

Loop with Condition

The Loop with Condition workflow loop can be used to iterate through a group of workflow actions until a certain condition is not met anymore.

When you add this workflow loop to a SharePoint workflow, the following sentence is displayed:

The contents of this loop will run repeatedly while: value equals value

Before you can use the Loop with Condition workflow loop, you must configure it, just like you would configure an If-condition in a workflow.

To configure a condition for the loop the run under:

Note that a workflow condition need not always be about comparing numbers with each other. You can also compare string values with each other.

Example of using the Loop with Condition workflow loop:

Related Articles

ADVERTISEMENTS