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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nested Collection Tabl...
Power Apps
Unanswered

Nested Collection Tables to Gallery

(0) ShareShare
ReportReport
Posted on by 15

Hi All,

Here is my scenario. I have PowerApps connected office365Users connector. 

I have fetch all  persons details reporting to a person  to a collection called "centralheadlist". "centralheadlist" is successfully imported to gallery as well . 
Now I have one more gallery . where I want to display all records belongs to first record of centralheadlist. Mail . Similarly I want data in same gallery from 2nd record , 3rd and so on . My gallery should change data as per my dropdown selection which has items from centralheadlist. Mail. Please help.

step 1. centralheadlist : ClearCollect(centralheadlist, Filter(Office365Users.DirectReports(If ("Head" in Office365Users.UserProfile(VarUserEmail).JobTitle,VarUserEmail,"You don't have any Delivery Head Under your Org")),"Delivery Head" in Job Title));
step2: ClearCollect(TestDataLM,{Gallery_Table:ForAll(centralheadlist. Mail,(Office365Users.DirectReports(Mail)))})
step3: dropdown: items=centralheadlist. Mail
how to make gallery to display data as per selection on dropdown and get relevant data from step2.

Aggregation nested collection  Re: Create Nested Collections 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @Kashif1 :

    Please try this :

    step 1. centralheadlist : ClearCollect(centralheadlist, Filter(Office365Users.DirectReports(If ("Head" in Office365Users.UserProfile(VarUserEmail).JobTitle,VarUserEmail,"You don't have any Delivery Head Under your Org")),"Delivery Head" in Job Title));

    step2: 

     

    Clear(centralheadlist);
    ForAll(centralheadlist.Mail,
     Collect(TestDataLM,
     {Gallery_Table:Office365Users.DirectReports(Mail),
     Mail:Mail}
     )
    )

     


    step3: dropdown(Dropdown1)

    items

     

    TestDataLM

     

     1.JPG

    Step4:set the gallery's items properity to:

     

    Dropdown1.Selected.Gallery_Table

     

     Best Regards,

    Bof

  • Kashif1 Profile Picture
    15 on at

    Hi @v-bofeng-msft ,

    I tried but there is no data in centralheadlist now.

    See my Onvisible screen property:

    Kashif1_0-1595559983903.png

    Rest i have updated as per your recommendation

  • Kashif1 Profile Picture
    15 on at

    Hi @v-bofeng-msft ,

    After making //Clear(centralheadlist); this on onvisble property of screen i can see its loading as per Dropdown . Thanks .

    I have last query . This data will autoupdate whenever there is change is outlook users (office365Users)?

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Kashif1 :

    I suggest you put these codes into the OnSelect property of a button to test whether the code works correctly.

    Best Regards,

    Bof

  • Kashif1 Profile Picture
    15 on at

    HI @v-bofeng-msft ,

     

    Thanks. It somehow solved my half now at least i have data in hand .  Now i can apply filters refine my data. 

    I also got my mistake. Thanks for the guidance.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard