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

Nested objects in collection table

Hello,

I hope you can help me.

As a result of "Planner.ListTasksV2(id).value" for all Planner plans of our groups, I have a collection with the userIds that are assigned to a task nested in "_assignments".  I want to have an own row for each task with one user. For example if one task has three assigned users, I want to get three rows with each title+userId. So I want to "unnest" it. But i don't now, how ich need to write it in PowerApps.

 

In the collections view, _assignments is shown as an object. I'd like to create a new collection with the tasks and a column for the userId so the task's title and userId together would be like a primary key.

 

I need to filter the tasks by each userId that is nested in _assignments.

 

In fact this approach is only a workaround, because the Graph query "GET all Planner tasks for user: https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/planner/tasks" doesn't work with another user than my own because of permission issues.

 

I'm sorry, if I'm too confusing.

1 ACCEPTED SOLUTION

Accepted Solutions
niaadami
Frequent Visitor

I found the solution: I have to use the Ungroup function. (I just started with PowerApps and didn't know about it)

ClearCollect(AllTasksUngroupAssign, Ungroup( AllTasksTable, "_assignments" ) )

View solution in original post

1 REPLY 1
niaadami
Frequent Visitor

I found the solution: I have to use the Ungroup function. (I just started with PowerApps and didn't know about it)

ClearCollect(AllTasksUngroupAssign, Ungroup( AllTasksTable, "_assignments" ) )

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,021)