Forum Discussion
Overview of completed tasks per day and who completed them
Are these SharePoint tasks in a single SharePoint task list? Or Planner tasks in a single Planner Plan? Or something else?
What have you tried so far? Are you stuck somewhere specifically?
- Thomas1730Jul 30, 2022Copper Contributor
Hello Sandy, what is the difference between tasks in a single SharePoint task list? or scheduler tasks? The tasks are in Planner in different buckets. I've tried this so far but unsuccessfully, how do I get the name/userid of the user who completed the task? Thank you for your help- Thomas1730Aug 05, 2022Copper ContributorNo One a solution ?
- Sandy UssiaAug 14, 2022MVP
Hi Thomas1730
Thanks for the additional info! Sorry, I've been on vacation 🙂
You're right that the completedBy person isn't shown in the Dynamic Content of the Filter Array result, possibly because there isn't always a completedBy value? But you can still retrieve it by typing it in. If you look at the output of the Filter Array action, you'll see there's a completedBy element - and even if a JSON element doesn't appear in the Dynamic Content UI, you can still refer to it manually. You can use the same syntax to get that user ID as the built-in dynamic content placeholder uses to get the createdBy user ID: that is, ['completedBy']?['user']?['id']
If you enter that as an expression in the Get User Profile action, it will get the profile of the user who completed the Planner task. Power Automate will automatically put that into a loop (for each item in the filtered array).
To test something like you're looking for, I initialized an Array variable at the top of the flow, and then used Append to Array within the loop to get each task's Title and the CompletedBy user's Display Name. Then outside the loop, created an HTML table from the array variable, that you could then put in an email.
(By the way, I guess you'd also want to filter on the Completed Date as well as the Percent Complete, right?)
Does this help you...?
Sandy
- Thomas1730Aug 25, 2022Copper Contributor
Hello Sandy, I hope you had a nice relaxing holiday. Thank you for your detailed answer, unfortunately I'm still at the very beginning and don't quite understand it yet. I've now tried to recreate your screenshot with my data, but I can't select or enter a name for the array variable, I probably did something wrong before? Can you look at that again and maybe paste your whole skein as a picture.
You also write that I should look at the output from the filter array, how can I display these? Many Thanks