Andrew87
Scholar

Loop For Each with a assign task

I have a list with a location and email column. 

Andrew87_0-1633715148495.png

I'm trying to setup a task to loop through the list and assign a task for each site utilizing the email address associated with that site. 

Andrew87_1-1633715317391.png

This does work however it waits for the first task to be completed before it sends out the next task. I need it to all go out at the same time? Is this possible?

Labels: (1)
0 Kudos
Reply
4 Replies
rbahassine
Rookie

Re: Loop For Each with a assign task

Is it the same task you want to assign to each person? If so, then try to use "Assign a task to multiple Users" . But first you'll need to create a collection with all your email addresses

0 Kudos
Reply
Gavin-Adams
Explorer

Re: Loop For Each with a assign task

@Andrew87 

As per the other response you could use a mutli user task and concatenate all the assignees.

 

If the tasks are different and you do not want the workflow to wait in a loop, split the task out into it's own component workflow then use a call a workflow action to start it.

 

See my answer to this very similar post the other day.

Solved: Assigning a task to multiple users through looping... - Nintex Community 

0 Kudos
Reply
Andrew87
Scholar

Re: Loop For Each with a assign task

Each task will contain different information provided by the list. The goal is for a scheduled workflow to start and send each responsible contact a task with their location in the subject and how many badges they have and for them to confirm they have badges.

Andrew87_0-1634755367280.png

Andrew87_1-1634756443722.png

 

If I split these into to tasks the first being the scheduled and querying a list. Then the second a component workflow with the loop and assign task. How does the task get the information from the first workflow?

Andrew87_3-1634756550497.png

 

Andrew87_2-1634756538125.png

 

 

0 Kudos
Reply
Gavin-Adams
Explorer

Re: Loop For Each with a assign task

@Andrew87 ,

So two method, configure a bunch of start workflow variables on the component workflow and fill in the details inside the for each loop.

 

Or,

In your for each loop this will have the ID of the item from your query list action.

 

I would pass the item ID as a start workflow variable on the component workflow.

Then in your component workflow you can do a query list filtered on the Item ID.

This is saved to an object and would only have a single item in the object but its still an array.

 

In the Object variable for sharepoint online, there is a special 'First Item' object.

That will allow you to access all the details of the sharepoint list item that you want to reference in the task without having to do a for each loop on the object return from the query list action.

Screenshot 2021-10-21 103833.png

 

 

0 Kudos
Reply