SOLVED

Create planner task when new list item is created - issue with multiple "assigned to"

Copper Contributor

Hi everyone, 

I created a flow to create a planner task when a SharePoint list item is created - the flow is supposed to assign it to the person(s) listed, but the error I'm getting is if multiple people are listed, it creates that many amounts of the same task instead of just listing everyone in 1 task. I'm sure the issue lies with the "apply to each > Assignned To" portion, but I don't know how else to change it as I've tried changing it to Apply to each > body/ID/task, etc. and nothing else works. 

Any feedback is greatly appreciated, thank you in advance! 

Example: 

List item: 

cinna103_4-1694817516592.png

Planner Task - Expectation:

cinna103_5-1694817543349.png

 

Planner Task - Reality:

 

cinna103_6-1694817561222.png

 

 

My flow: 

cinna103_0-1694816903314.pngcinna103_1-1694816928004.png

cinna103_2-1694816988376.png

cinna103_3-1694817005780.png

 

 

 

 

1 Reply
best response confirmed by cinna103 (Copper Contributor)
Solution

Hi @cinna103 ,

you are creating a new task for each value of your "AssignedTo" field contains entries for each person you added into that field.
If you want to create a single planner task that is assigned to multiple persons, your need to enter their E-Mail addresses separated by a semicolon into that field

SvenSieverding_1-1694859802128.png

 

So, first create a new array variable "Recipients", then use the "Append to Array Variable" action  and enter your "Assigned to" field. It will automatically surround that with an "Apply to each".

After that create a "Join" action and enter the "Recipients" variable as the value for "From" and a semicolon as the value for "Join with".

Finally Use the "Output" value from your "Join" action in the "Assigned User Ids" field of the "Create a task" action.

SvenSieverding_0-1694859783051.png

 

Best Regards,
Sven

1 best response

Accepted Solutions
best response confirmed by cinna103 (Copper Contributor)
Solution

Hi @cinna103 ,

you are creating a new task for each value of your "AssignedTo" field contains entries for each person you added into that field.
If you want to create a single planner task that is assigned to multiple persons, your need to enter their E-Mail addresses separated by a semicolon into that field

SvenSieverding_1-1694859802128.png

 

So, first create a new array variable "Recipients", then use the "Append to Array Variable" action  and enter your "Assigned to" field. It will automatically surround that with an "Apply to each".

After that create a "Join" action and enter the "Recipients" variable as the value for "From" and a semicolon as the value for "Join with".

Finally Use the "Output" value from your "Join" action in the "Assigned User Ids" field of the "Create a task" action.

SvenSieverding_0-1694859783051.png

 

Best Regards,
Sven

View solution in original post