cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jenncarneiro
Level: Power Up

When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

HI newbie here.

 

I have successfully setup the flow (based on template) to update a sharepoint list item when a planner task is marked complete, but I need this flow only to work on planner tasks that are in a certain bucket. I cannot seem to successfully filter this.

 

Here is the current working flow, but this would work on all tasks. Again, I only want it to work on Tasks whose bucket is ORDERS:

 
 

working flow no filter.png

 

I can't use the filter query on the sharepoint Get Item section, I think I need a trigger condition on the Task is completed section... How would I write that?

 

I appreciate the help!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

@jenncarneiro 

Hi there.  So, on your second question...that is correct.  If the event does not meet the condition you've set, then the flow won't even trigger.  This is helpful to keep the number of runs down to just the ones that you actually need.  If your situation requires you to see *all* events, then we can put the condition after the trigger and 'fail' the flow if it doesn't meet the criteria.  Let me know.

 

On the first part, it definitely looks like a permissions thing but I'm not sure what's driving it.  If you click on the ellipsis ('...') , take a look at your connection to make sure it's the one you want.  I want to make certain the Planner account that is connected to your flow, is the same one you are using to complete the task.  

 

Keep us posted.  You're very close.

-Ed-

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

6 REPLIES 6
Super User
Super User

Re: When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

@jenncarneiro 

Hi there.  So, I think you're totally on the right path with the trigger condition but I wasn't totally sure how to do it.  

If you run the flow, you'll see that there is a bucketId field with the unique identifier (GUID) of the task's bucket.  By looking at a run of a task that you know is in the right bucket, you can grab that ID to use in your expression.

 

Then, following this video from @RezaDorrani - I was able to build the expression:

equals(triggerBody()?['bucketId'],'7ewfq26znUyQlblk-dMsfdQABwFs' which basically checks if the bucket ID matches that GUID from the bucket I want before triggering.
 
When you go to add this to the trigger condition, be sure to add the '@' in front of it.
 
Hope that helps, please keep us posted.
-Ed-
 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Community Support Team
Community Support Team

Re: When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

Hi @jenncarneiro ,

 

As @edgonzales  said you could add a Condition under the trigger to check the Bucket Id of the task as below:

1.png 

Best regards,

Alice       

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

jenncarneiro
Level: Power Up

Re: When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

Thank you.

 

I was able to find the Bucket Id from the flow that worked:

"bucketId": "smtEyj6ZSE6eqC_j2K1BomUADfap"

 

I put this in the trigger condition :

 

"@equals(triggerBody()?['bucketId'],'smtEyj6ZSE6eqC_j2K1BomUADfap')"

 

 

 

flow trigger condition 1.png

 

When i check the flow run i get an error that says there is a problem with the trigger:

 

fix trigger.png

 

It gave me a forbidden error :

forbidden.png

 

"{
"error": {
"code": "",
"message": "You do not have the required permissions to access this item.",
"innerError": {
"request-id": "4e867d36-8d12-4f88-bbfb-7d6224740aab",
"date": "2020-01-14T01:33:45"
}
}
}"
 
 
But then it also said the flow succeeded.
I am not sure why I am getting this error but I don't feel it is something I can ignore either.
 
When I mark a task completed that doesn't meet the trigger condition, i don't even see a flow run.
Is that intentional? or shouldn't I see that the flow ran but the item didn't meet the trigger condition?
Super User
Super User

Re: When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

@jenncarneiro 

Hi there.  So, on your second question...that is correct.  If the event does not meet the condition you've set, then the flow won't even trigger.  This is helpful to keep the number of runs down to just the ones that you actually need.  If your situation requires you to see *all* events, then we can put the condition after the trigger and 'fail' the flow if it doesn't meet the criteria.  Let me know.

 

On the first part, it definitely looks like a permissions thing but I'm not sure what's driving it.  If you click on the ellipsis ('...') , take a look at your connection to make sure it's the one you want.  I want to make certain the Planner account that is connected to your flow, is the same one you are using to complete the task.  

 

Keep us posted.  You're very close.

-Ed-

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

View solution in original post

Community Support Team
Community Support Team

Re: When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

Hi @jenncarneiro ,

 

Have your problem been solved?

Please reply here if you have any problem.

 

Best regards,

Alice       

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

jenncarneiro
Level: Power Up

Re: When Certain Planner Task is marked complete, update sharepoint list - how to filter which planner tasks?

Hi Alice,

Unfortunately I haven't been able to get back to this to verify yet.

I believe this will work, but haven't resolved the trigger error issue.

 

Could that be caused by being signed out with the page open and running the flow a day (or two) later without signing back in?

 

If so then I think it is resolved 🙂

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (6,423)