Hi Community!
I'm hoping for guidance/help. I have researched other posts but haven't found a solution. I am working on a flow that checks existing planner tasks. If one does not exist, then create one. Seems simple but I'm stuck in a constant loop where it creates the same task multiple times.
I have confirmed the first condition produces the correct output I need to compare the list of tasks. I have provided screenshots to help describe my workflow. (Side note: I'm generating emails instead of creating tasks for easy cleanup.)
The spName output from the first condition. Output
Workflow:
Workflow continues:
Existing Planner tasks. Condition: Title contains spName
(example: Yearly Update: ELMS Assign to Individuals - document owner found contains ELMS Assign to Individuals)
Emails generated for tasks to be created. These tasks already exist but I'm getting emails stating one should be created.
Thank you for any help/guidance!
Solved! Go to Solution.
Hello @lwine ,
you receive the email because you always loop through all the tasks. You take all the tasks, and each of them compare with the new task name. If it's not equal (which will happen for all expect 1 task) you receive the notification.
You should use the 'Filter array' action to search if a task exists, not 'Apply to each' and 'Condition'. I wrote about it on my blog.
Hello @lwine ,
you receive the email because you always loop through all the tasks. You take all the tasks, and each of them compare with the new task name. If it's not equal (which will happen for all expect 1 task) you receive the notification.
You should use the 'Filter array' action to search if a task exists, not 'Apply to each' and 'Condition'. I wrote about it on my blog.
Thank you! I will look at your blog post. 😊
User | Count |
---|---|
101 | |
36 | |
29 | |
25 | |
16 |
User | Count |
---|---|
133 | |
54 | |
53 | |
37 | |
26 |