Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a task in a For each loop

We have a workflow which, in the first step, executes a query on another list.

It will lookup a number in the column Parent and see which items have that number.


After that the workflow needs to create a task for every item founded.


In our workflow I created a For each loop (sorry for the Dutch ):



When the workflow is activated it will only create the first task, and the workflow is "paused":



It is paused until the created task is completed. After that the workflow will start the For each again for the second task, and so on, and so on.


What I actually want is that all tasks are create simultaneously and the workflow ends.


Any ideas?




Kevin Stouthandel

Labels: (1)
Tags (3)
0 Kudos
4 Replies
Workflow Hero

Re: Create a task in a For each loop

The basic idea of For Each loop is to work on each item of the collection one at a time. So No, it cannot send all the tasks together. It will be a serial order only.

But if you have the users names in the collection to which the tasks have to be assigned, add that collection to the Approvers in your FlexiTask or Request Approval action without For Each loop. This will send individual taks to all users in collection. Hope that helps.

0 Kudos
Accept as Solution Reply
Not applicable

Re: Create a task in a For each loop

Hi Kapil,

Thanks for the quick response.

In my case there is 1 user who will excecutes 1 or more tasks. Depending on the query done in the step before.

In a metadata field a parent number is added. The query will look in another list for that parent number en gives back the child items. For every child item a task needs to be created. The user who needs to complete the task is entered in a metadata field and is always 1 person.


User enters "12345" as parent and sets the person to "Person A". Query finds:

Parent "12345" has 2 childs in the list: "678" and "901"

In the task list there 2 tasks need to be created:

Task 1:

Description: Task 678

User: Person A

Task 2:

Description: Task 901

User: Person A


0 Kudos
Accept as Solution Reply
Not applicable

Re: Create a task in a For each loop

He Kevin,

I wonder if would work if you export whole content of the loop to new workflow and in the loop start that another workflow.


0 Kudos
Accept as Solution Reply
Community Manager Community Manager
Community Manager

Re: Create a task in a For each loop

So just a quick thought, the pause is because the task has to be complete before it continues.  You may have to rethink what you are really wanting to occur and write it out before building the workflow.  Currently your workflow is running as you would expect it.

0 Kudos
Accept as Solution Reply