Hi,
I'm trying to build a flow to copy tasks from the task planner to an excel table (with name of the task, the start date, due date and the assigned users) and get an error saying:
"The execution of template action 'Apply_to_each_3' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')' is of type 'Object'. The result must be a valid array."
The 'Apply_to_each' refers to each task, the 'Apply_to_each_3' refers to the assigned users (as there can be more than one). Does anyone has an idea how to either build the flow different to avoid an 'Apply to each' inside an 'Apply to each' or how to solve the conversion issue with the array?
Solved! Go to Solution.
Hi @flake,
Just to double check. Are you using the List Tasks action from the Planner connector?
If so, you could use value assignments field (collection) in the second apply to each loop to loop through the assigned users.
You should be able to select that field as dynamic content. As an expression that would be:
items('Apply_to_each')?['_assignments']
Hi @flake,
Just to double check. Are you using the List Tasks action from the Planner connector?
If so, you could use value assignments field (collection) in the second apply to each loop to loop through the assigned users.
You should be able to select that field as dynamic content. As an expression that would be:
items('Apply_to_each')?['_assignments']
It worked, thanks a lot!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
33 | |
32 | |
25 | |
24 | |
21 |
User | Count |
---|---|
64 | |
56 | |
44 | |
37 | |
29 |