cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jenncarneiro
Regular Visitor

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

@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

@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.

v-alzhan-msft
Community Support
Community Support

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.

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?

@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.

v-alzhan-msft
Community Support
Community Support

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.

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,274)