My goal is to get a count of the number of Open and Completed Tasks in a Planner plan. With those numbers it will update a SharePoint list so I have an overview of the project progress.
I cant seem to find an easy way to do this, screenshots are of a way to get the the numbers out of the plan
The results only come back with the total number of tasks in the plan regardless of their complete percentage. Can anyone help?
Cheers
Solved! Go to Solution.
Hi @PinVin,
You can avoid the loop by using the array outside of the apply to each. And use a length function to count the number of items.
Below is an example of that approach.
You can use this expression for Closed Tasks:
length(body('Filter_array_-_Closed_Tasks'))
You can use this expression for Open Tasks. In this expression I subtract the number of Closed Tasks from the total of number of tasks to get the open tasks.
sub(length(outputs('List_tasks')?['body/value']),length(body('Filter_array_-_Closed_Tasks')))
Hi @PinVin,
You can avoid the loop by using the array outside of the apply to each. And use a length function to count the number of items.
Below is an example of that approach.
You can use this expression for Closed Tasks:
length(body('Filter_array_-_Closed_Tasks'))
You can use this expression for Open Tasks. In this expression I subtract the number of Closed Tasks from the total of number of tasks to get the open tasks.
sub(length(outputs('List_tasks')?['body/value']),length(body('Filter_array_-_Closed_Tasks')))
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
66 | |
57 | |
29 | |
27 | |
25 |