cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sabirin
Advocate II
Advocate II

Issue using Planner-When a task is complete or When ANY task is complete

I have a simple flow

 

NewSharepointitem (the first trigger)

Create Planner task in PlannerID "workgroup", bucket "new request" ,(based on information from Sharepoint item)

Delay 5 second, (it gets error if no delay were submitted)

Update task detail ( Taskid (from CreatePlannerTask) add some more information into description

When a task detail is complete - (the same PlannerID from (CreatePlannerTask)

 

Apply on each

Sharepoint Update Item (ID NewSharepointItem to add information that the task is finished)

 

I realize that when there are many task in the PLAN_ID then all task will be executed on the "Apply on each action"

If we can specify just ONE TASK to complete then that would be heaven....

 

I believe Plan ID is where the collaboration happen, where everyone can see that are the tasks is in queueing and so on. 

So this Action need to be improved... 

 

 

I think this is not a difficult improvement to be made.

 

Regards,

 

Scenario : 

- i create 3 sharepoint item (aaa,bbb,ccc)

- there are 3 taskID in my planner for aaa, bbb, ccc 

- when i complete task aaa

- all the Flow is reading that there is a task finished in this PlanID 🙂 

- it ends up updating my wharepoint fo aaa, bbb, ccc

- eventough taskid bbb and taskid ccc is not completed / started at all

 

I hope someone would understand and can help improve this wonderful feature

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @sabirin,

 

Could you please share a screenshot of your flow's configuration?

Could you please show more details about your scenario?

Do you want to only update the aaa SharePoint item rather than bbb or ccc SharePoint item when Task aaa is completed in your Planner plan?

 

I have created a SharePoint list on my side and the data structure of it as below:11.JPG

Note: The Status column is a Choice type column, the TaskName column is a Single line of text type column and the Executor column is a Person or Group type column.

 

I also created there Planner tasks for above there SharePoint items and the data structure of it as below:12.JPG

 

Please take a try with the following workaround:

  • Add a "When a task is completed" trigger, specify Plan id.
  • Add a "Get items" action, specify Site Address and List Name. Within Filter Query field, type the following formula:
TaskName eq 'Title Dynamic content of the trigger'

Note: The Title dynamic content is wrapped with single quotes. The TaskName represents the TaskName column in my SharePoint list.

 

  • Add a "Apply to each" action, input parameter set to output of "Get items" action.
  • Within "Apply to each" action, add a "Update item" action, specify Site Address and List Name. Id field set to ID dynamic content of the "Get items" action, Status Value field set to Completed.

Image reference:13.JPG

The flow works successfully as below:14.JPG

15.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks to your inspiration i found a way to do this by using Get Lists.

 

I have to cut my original flow into two

First one is just : 

  1. When new Sharepoint Item Created
  2. Create a task ,
  3. update task details. 
  4. Finish

Second one is

  1. When a task is completed
  2. Get Tasks with filter "Title eq 'Title'
  3. on each - do something  until it finish.... 

 

This the solution that i can think of... This way the task completed is working as expected.

I found the problem is if i put it in one single flow. the flow will continue efen if the task finished is not the intended flow.

Its quite funny to come up something like this.. its like killing a mosquito with an AK-47...

 

 

View solution in original post

8 REPLIES 8
v-xida-msft
Community Support
Community Support

Hi @sabirin,

 

Could you please share a screenshot of your flow's configuration?

Could you please show more details about your scenario?

Do you want to only update the aaa SharePoint item rather than bbb or ccc SharePoint item when Task aaa is completed in your Planner plan?

 

I have created a SharePoint list on my side and the data structure of it as below:11.JPG

Note: The Status column is a Choice type column, the TaskName column is a Single line of text type column and the Executor column is a Person or Group type column.

 

I also created there Planner tasks for above there SharePoint items and the data structure of it as below:12.JPG

 

Please take a try with the following workaround:

  • Add a "When a task is completed" trigger, specify Plan id.
  • Add a "Get items" action, specify Site Address and List Name. Within Filter Query field, type the following formula:
TaskName eq 'Title Dynamic content of the trigger'

Note: The Title dynamic content is wrapped with single quotes. The TaskName represents the TaskName column in my SharePoint list.

 

  • Add a "Apply to each" action, input parameter set to output of "Get items" action.
  • Within "Apply to each" action, add a "Update item" action, specify Site Address and List Name. Id field set to ID dynamic content of the "Get items" action, Status Value field set to Completed.

Image reference:13.JPG

The flow works successfully as below:14.JPG

15.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Kris, sorry cant make it to work..

 

Here is my setups :

i create 3 item in my SPList,  (aaa bbb ccc)

Then i mark complete in planner for task (bbb)

What im noticing is whenever one task is finished (bbb) Other flow (aaa and ccc) will continue and complete flow.

 

Here is Screen Shot 2018-04-16 at 17.56.23.pngthe flow...the flow...

flow bbb runningflow bbb runningflow aaa run, even task aa is not completedflow aaa run, even task aa is not completedflow ccc run also triggered by bbb completionflow ccc run also triggered by bbb completion

Hi @sabirin,

 

Could you please share a bit more about the input parameter within your "Apply to each 2" action?

 

I think it is not necessary to add a "Apply to each 2" action within your flow. The "When a task is completed" trigger of Planner connector could only detect if there is a task (single task) is completed in your Planner plan within single flow run, it could not detect if multiple tasks are completed within your Planner plan.

 

Please consider remove the "Apply to each 2" action within your flow and add the "Get items" action under the "When a task is completed" trigger directly. Please refer to the solution (flow screenshot) that I provided above and then try your flow again to check if the issue is solved.

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TaskName eq 'Title Dynamic content of the trigger'

Where should i get this "Title Dynamic content of the trigger' ? from "Create a new task" action or "When a task is finished "

On my screenshot i was using "When a task is finished" thats why they automatically create "apply to each'

 

 

Now i try to use Title from "Create a new task" it didnt create another apply to each but the result is the same

 

 

this time i create task ddd eee fff and i complete only task eee 

the ddd and fff is also continue when a task is finished

Screen Shot 2018-04-17 at 09.28.28.png

Here is the screenshot of the flow using title from "create new task"

Screen Shot 2018-04-17 at 09.28.28.png

Thanks to your inspiration i found a way to do this by using Get Lists.

 

I have to cut my original flow into two

First one is just : 

  1. When new Sharepoint Item Created
  2. Create a task ,
  3. update task details. 
  4. Finish

Second one is

  1. When a task is completed
  2. Get Tasks with filter "Title eq 'Title'
  3. on each - do something  until it finish.... 

 

This the solution that i can think of... This way the task completed is working as expected.

I found the problem is if i put it in one single flow. the flow will continue efen if the task finished is not the intended flow.

Its quite funny to come up something like this.. its like killing a mosquito with an AK-47...

 

 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,029)