How to capture all assigned planner task user ids to create new task with same users
I have a trigger on when a planner task is completed in a plan bucket to open a new planner task assigned to the same planner task assignees of the closed one and put it in the next appropriate bucket (sort of a process flow guide on main tasks in lifecycle).
When I grab the Assigned UserID field of the one that's closed, it only grabs the one person, not everyone.
When try to use the Planner Assigned User ID it auto creates "apply each", so I'm guessing that I'm missing a step to grab all of the user IDs in the task and it just grabs the last one.
One way of approaching this is to first initialize an array variable. Loop through the users to whom the task was assigned and append the IDs to the variable. Then, loop through the array after creating the new task and add the users to the task using an Add assignees to a task action.
If I have answered your question, please mark your post as Solved. If you like my response, please give it a Thumbs Up.
Sounds ideal 🙂 However, I haven't really any experience yet with the way to loop through the array and append the information in the Flow tool (I can do it in code but not the Flow wysiwyg. Any chance you can show me a sample set up so I get the concept of how to do that in the tool?