Hello,
I am trying to create a flow where a new servicenow incident is created when a new Planner task is created. I have successfully created it, with the exception of the assigned to value. I've tried the variable, getting info from user profile, and have been generally frustrated at getting this working. This is the error:
The execution of template action 'Apply_to_each_4' failed: the result of the evaluation of 'foreach' expression '@{triggerOutputs()?['body/_assignments']}@{items('Apply_to_each')?['value']}' is of type 'String'. The result must be a valid array.
This is how my flow is constructed:
Now in the create service now incident:
Any ideas?
Solved! Go to Solution.
Hi @Anonymous
Thank you for posting.
According to your description, seems you would like to create item in sharepoint once new task created. But stuck on get displayname parameter. If any misunderstanding, please kindly let me know.
Actually, there are several loops unnecessary existing in your flow. Here is my solution for your scenario, if we have multiple assignees in new task, their displayname will be added within one field.
SPO list:
Flow overview:
Once tested, I’m able to get new item in sharepoint:
I tested two tasks which assigned to one person and two people. Then I got below results.
If the solution is not quite suitable for your scenario, please share me your detailed configuration and requirement.
Hope the content above may help you.
Best regards,
Anna
Hi @Anonymous
Thank you for posting.
According to your description, seems you would like to create item in sharepoint once new task created. But stuck on get displayname parameter. If any misunderstanding, please kindly let me know.
Actually, there are several loops unnecessary existing in your flow. Here is my solution for your scenario, if we have multiple assignees in new task, their displayname will be added within one field.
SPO list:
Flow overview:
Once tested, I’m able to get new item in sharepoint:
I tested two tasks which assigned to one person and two people. Then I got below results.
If the solution is not quite suitable for your scenario, please share me your detailed configuration and requirement.
Hope the content above may help you.
Best regards,
Anna
Thank you so much! That did the trick.
User | Count |
---|---|
88 | |
40 | |
23 | |
20 | |
16 |
User | Count |
---|---|
129 | |
50 | |
48 | |
35 | |
26 |