web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Nested Collection

(0) ShareShare
ReportReport
Posted on by 16

Hello and hope everyone is doing well. I'm very new to power apps. Basically first day. I have been messing around in power apps and enjoying it but having some issues with a collection.

I created a collection by :

Collect(colDirectReports, Office365Users.DirectReportsV2("paulk@test.com"));
which has in it the users that this person manages. But when i look at the collection I see the collection only has 1 row. If I expand that row, then i have all may data I'm trying to retrieve in there. 
CJStylez_0-1719587002038.png

 

I presume this is nested. If i click on the table icon under value I see all my data. How can I retrieve this data into a gallery. I have tried putting in colDirectReports in the Item field of the gallery but when I try to configure a title say with ThisItem I do not see any values for me to set.

I have been looking for an answer to this for a day. 

I also have another basic issue also. If I where to create a variable by 

Set(varPresident, Office365Users.SearchUser({searchTerm: "Paulk"}));
Set(varTest, varPresident.Id);
I'm just wondering why the command for 
Collect(colDirectReports, Office365Users.DirectReportsV2("paulk@ippolitogroup.com")); would not use the variable if I put it in like :
Collect(colDirectReports, Office365Users.DirectReportsV2(varTest)); It almost seems like the input is not a string.
Any help or direction would be great.
Cheers
Chris
 

 

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,016 Most Valuable Professional on at

    Change your first collection to the following to avoid the nesting. The array of records is returned as a property called value. That is what you want in the collection.

    Collect(colDirectReports, Office365Users.DirectReportsV2("paulk@test.com").value);

     

    For your second question the problem is that Id is a Guid, not a string.  Instead use the following. 

    Set(varTest, Office365Users.SearchUser({searchTerm: "Paulk"}).mail);

     

  • CJStylez Profile Picture
    16 on at

    Thanks so much for the super quick response. This code you provided fixed my issues. I was sure is was a simple and easy one for people that are familiar with power apps. I need to do some more training on it. Thanks again and have a great day.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard