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

Create a daily summary of Planner Tasks by Bucket - Display User name

Using this flow to generate an email for a set of daily tasks, these can be completed by a number of users, so I have amended the array to add a column for "CompletedBy", however using dynamic content to pull "value completed by user completed by display name" comes up blank.  If I use any of the "id" options it pulls the ID data through.

 

Found an article on the same flow, their issue was on the date format but I happened to see they had managed to put in a workaround to display the assigned name.  So I thought I would use it as a guide to doing it for "completedby".

 

https://powerusers.microsoft.com/t5/Building-Flows/How-do-I-format-the-date-in-the-standard-template...

 

However, I can't get it to work! Flow either fails or no data appears in the email, depending on what value I place in "*select an output from the previous  steps"

 

IainG_0-1572436685098.png

 

IainG_1-1572436722087.png

IainG_2-1572436766196.png

IainG_3-1572436789826.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

 

Hi @IainG ,

 

Please refer to the following method to configure your Flow.

  • Use an expression to get the user id.
items('Iterate_through_tasks')?['completedBy/user/id']
  • And set the Set TaskDetails variable action can also run normally after the Get user profile action fails.

https://flow.microsoft.com/en-us/blog/error-handling/

  • Then use if () function to determine whether the user id is empty, if it is, then the value of the CompletedBy field is empty, if not, then use the display name output by the Get user profile action.
if(equals(items('Iterate_through_tasks')?['completedBy/user/id'],null),'',outputs('Get_user_profile_(V2)')?['body/displayName'])

Image reference:

49.PNG

50.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
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

8 REPLIES 8
Community Support Team
Community Support Team

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

 

Hi @IainG ,

 

Please refer to the following method to configure your Flow.

  • Use an expression to get the user id.
items('Iterate_through_tasks')?['completedBy/user/id']
  • And set the Set TaskDetails variable action can also run normally after the Get user profile action fails.

https://flow.microsoft.com/en-us/blog/error-handling/

  • Then use if () function to determine whether the user id is empty, if it is, then the value of the CompletedBy field is empty, if not, then use the display name output by the Get user profile action.
if(equals(items('Iterate_through_tasks')?['completedBy/user/id'],null),'',outputs('Get_user_profile_(V2)')?['body/displayName'])

Image reference:

49.PNG

50.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
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

Highlighted
IainG
Level: Power Up

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

Thanks for the detailed response, however, unfortunately, I still get an error on the Get User Profile.

 

WorkflowOperationParametersRuntimeMissingValue. The 'inputs.parameters' of workflow operation 'Get_user_profile_(V2)' of type 'OpenApiConnection' is not valid. Error details: The resolved string values for the following parameters are invalid, they may not be null or empty: 'id'

 

Thanks

Iain

Community Support Team
Community Support Team

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

 

Hi @IainG ,

 

This is the expected result, so we need to set configure run after.

 

Because not all tasks are completed, the completed by id may be empty.

 

According to my method configuration, you can get the results you want.

 

Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
IainG
Level: Power Up

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

Hi Barry,

 

Apologies, very new to flows,  so am confused as to what is now required?

I assume I have to configure something to except the null entry (for tasks that have not been completed), however, I had assumed that the "if" statement in the set variable was the workaround for this?

 

Thanks

Iain 

 

Community Support Team
Community Support Team

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

 

Hi @IainG ,

 

You only need to configure Flow according to the method in the screenshot I provided.

 

Is there something in the screenshot that you don't understand?

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
IainG
Level: Power Up

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

I took a further look and now see the issue the flow was failing is due to the formatting of the date!

Once I removed the formatting the flow works.

 

Thank you for your help I can now see the user name!  

 

I will now work on formatting the date to something cleaner.

 

Regards

Iain 

 

 

Behzad-Navabian
Level: Powered On

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

Hi @v-bacao-msft ,

your solution for getting CompletedBy works perfectly fine, 

Thank you! & wish you a nice weekend!

 

JeffNg88
Level: Powered On

Re: Create a daily summary of Planner Tasks by Bucket - Display User name

Hi @v-bacao-msft ,

 

Thank you for the detailed explanation. Sorry if my question was too stupid, I still couldn't get the flow working after following the guide. It keeps giving me this error whenever i'm trying to save the flow:

The template validation failed: 'The repetition action(s) 'Iterate_through_tasks' referenced by 'inputs' in action 'Get_user_profile_(V2)' are not defined in the template.'.

My end goal is to update the CompletedBy UPN into SP List when a task is completed.

Kindly advise. Thanks in advanced.
Annotation 2020-01-14 083717.png

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Kudoed Authors
Users online (3,842)