cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
poweruser11
Frequent Visitor

Updating Task Checklist upon completion of Flow

Hi all,

 

I'm trying to get my Automate to update a checklist on my planner as complete. 

 

Planner:

 

Bucket Task A

Task A Q1: Checklist A, Checklist B, Checklist C

Task A Q2: Checklist A, Checklist B, Checklist C

 

Bucket Task B

Task B Q1: Checklist A, Checklist B, Checklist C

Task B Q2: Checklist A, Checklist B, Checklist C

 

Task A name and Quarter Name will also be available on my Power Automate as an input from a list. I want to take these input fields, match it to the planner task title for the appropriate Quarter, and mark Checklist A and Checklist B as complete. Checklist C is not to be touched.

 

I've been trying to use 'Get plan details' and 'Update task details' but failing to achieve what I need, so any advice would be great. The trigger for this will be on a list, where a 'button' will be marked as 'true'. 

 

Visual context: The fields circled will be available to planner from a SharePoint list.

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-yiwenxie-msft
Microsoft
Microsoft

Hi @poweruser11 

 

If you use ‘items’ function, then you should put ‘filter array’ into an ’Apply to each’ action.

The error says you didn’t put filter array into a ‘Apply to each’ action.

For more info about items(), please go to the link: Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

Please reference the following steps:

2.11-20.PNG

 

If this still doesn’t work, could you please take screenshots of your detailed flow and the error details?

 

Best Regards,
Community Support Team _ Kira Xie
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

4 REPLIES 4
v-yiwenxie-msft
Microsoft
Microsoft

Hi @poweruser11 

 

You will need to use ‘List buckets’ and ‘List tasks’ in top level and ‘Get task details’ in nested action.

 

‘List bucket’ is used to get the two buckets ‘Task A’ and ‘Task B’.

‘List tasks’ is used to get tasks names.

‘Get task details’ is used to get checklist Id for these two tasks ‘Report Q1’ and ‘Report Q2’.

 

The whole flow is:

2.10-1.PNG

 

The detailed steps for ‘If yes’ in ‘Condition’:

2.10-2.PNG

The expression in ‘filter array’:

@and(equals(item()?['title'], 'Report Q1'), equals(item()?['bucketId'], items('Apply_to_each')?['id']))

 

The ‘filter array’ is used to filter out the tasks in the two buckets ‘Task A’ and ‘Task B’, and to filter out the tasks named ‘Report Q1’.

 

The detailed steps for ‘Apply to each 3’:

2.10-3.PNG

2.10-4.PNG

 

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

Hello, this is great and seems like the perfect solution! However, I get a save error on this one. I have used the same expression in 'filter array' just changed the Report Name to the actual name.

 

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Filter_array' at line '1 and column '13970' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Filter_array' to be referenced by 'repeatItems' or 'items' functions

poweruser11
Frequent Visitor

Apologies for the multiple edits - wouldn't let me post the reply fully!

v-yiwenxie-msft
Microsoft
Microsoft

Hi @poweruser11 

 

If you use ‘items’ function, then you should put ‘filter array’ into an ’Apply to each’ action.

The error says you didn’t put filter array into a ‘Apply to each’ action.

For more info about items(), please go to the link: Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

Please reference the following steps:

2.11-20.PNG

 

If this still doesn’t work, could you please take screenshots of your detailed flow and the error details?

 

Best Regards,
Community Support Team _ Kira Xie
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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,384)