cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
carterprine
Helper II
Helper II

Return Planner ._assignment user displayName in Table

I have a table with Planner assignments, and I'd like to show the assigned user's displayName in the table. I've tried a few variations of the following, without success:
 
Concat(ForAll(Planner.GetTaskV2(ThisItem.id)._assignments,Office365Users.UserProfileV2(userId)),displayName,";")
 
All that is returned in my "Assigned" column is [object Object].
 
Any help will be greatly appreciated!
 
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @carterprine ,

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

1.JPG

Please try to cut the formula within the Text property of the "Assigned" column in your Data Table, then re-paste it again within the Text property of the "Assigned" column, check if the issue is solved.

 

Based on the needs that you mentioned, I think the formula I provided above is correct. Please consider add a Gallery in your app, use the Gallery to list Planner Tasks instead of Data Table control. Then add a Label control within the Gallery, set the Text property to following:

Concat(
    ForAll(
           ThisItem._assignments,
           Office365Users.UserProfileV2(userId).displayName
    ),
    Value & ";"
)

check if the issue is solved.

Note: You could consider configure your Gallery control as a Tabular GRID. I think this issue may be related to Data Table control itself.

 

Best regards,

Community Support Team _ Kris Dai
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
v-xida-msft
Community Support
Community Support

Hi @carterprine ,

How do you display the Task details? Using a Data Table control?

 

Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify it as below:

Concat(
       ForAll(
              Planner.GetTaskV2(ThisItem.id)._assignments,
              Office365Users.UserProfileV2(userId).displayName
       ),
       Value & ";"
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

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

Hello @v-xida-msft ,

 

Thanks so much for your assistance. Yes, I am using the Data Table control. 

 

I attempted to use the formula you provided... and it looks like it should work, but I am still getting the [object Object] returned. 

 

Best regards,

Carter

 

Screen Shot 2020-05-18 at 9.50.27 AM.png

 

 

Hi @carterprine ,

Could you please share a bit more about the formula you typed within the Items property of the Data Table?

Do you want to display the user name within the "Assigned" column in your Data Table?

 

I assume that the "Assigned" column is bind to "_assignments" property of a Planner Task in your Data Table, is it right? Based on the screenshot that you mentioned, I think it's not necessary to include the Planner.GetTaskV2() function in this ForAll formula.

 

Please set the Text property of the "Assigned" column in your Data Table to following:

Concat(
       ForAll(
              ThisItem._assignments,
              Office365Users.UserProfileV2(userId).displayName
       ),
       Value & ";"
)

 

If the issue still exists, please consider re-add a new Data Table control in your app, connect it to your Planner Tasks Table, then bind the Text property of the "Assigned" column to above formula, check if the issue is solved.

 

Best regards,

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

Thanks so much for helping. Yes, I'm trying to show the User in the assigned column (First, Last name). Yes, that's correct, it is binding to the planner task in the data table. 

 

Interestingly, I attempted to add a new data table, with the exact same issue by default... _assignments column shows [object Object].

 

Hi @carterprine ,

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

1.JPG

Please try to cut the formula within the Text property of the "Assigned" column in your Data Table, then re-paste it again within the Text property of the "Assigned" column, check if the issue is solved.

 

Based on the needs that you mentioned, I think the formula I provided above is correct. Please consider add a Gallery in your app, use the Gallery to list Planner Tasks instead of Data Table control. Then add a Label control within the Gallery, set the Text property to following:

Concat(
    ForAll(
           ThisItem._assignments,
           Office365Users.UserProfileV2(userId).displayName
    ),
    Value & ";"
)

check if the issue is solved.

Note: You could consider configure your Gallery control as a Tabular GRID. I think this issue may be related to Data Table control itself.

 

Best regards,

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

Yes, your formula is correct -- however it seems my problem is one with PowerApps itself. I tried deleting and reconnecting the Planner data connection, and I'm getting the "something went wrong" error... ugh 😟

 

Screen Shot 2020-05-18 at 10.15.36 PM.png

Thanks a lot. You solved it for me as well. 
The Germany specific code I used:

Concat(
       ForAll(
              Planner.GetTaskV2(ThisItem.id)._assignments;
              'Office365-Benutzer'.UserProfileV2(userId).displayName
       );
       Value & ";"
)

 

But somehow it would not work for createdBy column... will investigate this.

Ok, this was some easy googling job, sorry Microsoft...

'Office365-Benutzer'.UserProfileV2(ThisItem.createdBy.user.id).displayName

 

Reference link:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Returning-Planner-s-ThisItem-CreatedBy-user-...

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,857)