Skip to main content
Community site session details

Community site session details

Session Id : nmOCTcRtGxxoASPju64pOt
Power Apps - Building Power Apps
Unanswered

Powerapps collections - drill down through 3 levels?

Like (0) ShareShare
ReportReport
Posted on 22 Sep 2021 11:53:35 by 11

Hi,

 

My app has a flow which imports several collections when a user logs in. One of these is named 'Park' and contains a 'Category' which I need a gallery to access. The issue is that this is on level 4 of the table structure. I need a gallery of the values in 'green' but can't seem to get to it. Any ideas?

 

 

Categories:
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on 05 Oct 2021 at 03:47:38
    Re: Powerapps collections - drill down through 3 levels?

    Hi @ITBird 

     

    Please let us know if anything needs on your post. We can help with this.


    Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful.

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on 24 Sep 2021 at 12:28:32
    Re: Powerapps collections - drill down through 3 levels?

    Hi @ITBird 

     

    I created a collection similar to you to test it.

    ClearCollect(
     Park,
     {
     Key: 0,
     Address: {Street1: "900 Main St"},
     category: {
     organization: 1,
     categoryDetail: {
     Description: "Audit",
     Text: "First Aid",
     Key: 95
     }
     }
     }
    );
    Collect(
     ParkCategories,
     {Category: First(Park).category.categoryDetail.Text}
    )

    When I assign Park or Category to Gallery as Items property than to display "Text" column

    ThisItem.category.categoryDetail.Text

    And also able to collect the "Text" column to the ParkCategories collection

     

    StalinPonnusamy_0-1632486355430.png

     

     Can you try this sample and see where the problem is.

  • ITBird Profile Picture
    11 on 24 Sep 2021 at 08:26:30
    Re: Powerapps collections - drill down through 3 levels?

    Hi, 

     

    Thanks for your response. 

     

    I'm trying to display a question bank based on the categories for each park. So the Park is collected when the user logs in. The categories are pulled from the DB in to a collection. Then I want to use a gallery to display the questions for the categories that this Park has assigned to it. 

     

    I've tried both of your methods above and both work up to the point category.categoryDetail but the .Text is always underlined in red and says 'Name isn't valid' I just can't seem to get to that last level to extract the value. Please see my collection structure below...

     

    ITBird_0-1632471933883.png

     

    ITBird_1-1632471951522.pngITBird_2-1632471963293.png

     

     

  • v-qiaqi@microsoft.com Profile Picture
    on 24 Sep 2021 at 07:12:06
    Re: Powerapps collections - drill down through 3 levels?

    Hi @AFE2E,

    Have you solved your problem?

    Do you want to add a record to your ParkCategories?

    Could you please share more about your need, access this value in a Gallery or add it into a collection?

     

    If you just want to access this in a Gallery, please set the Text property of the Label as below:

    ThisItem.Category.CategoryDetail.Text

    vqiaqimsft_0-1632466922137.png

     

    If you want to get this value into another collection, please modify your Collect() formula as below:

    Collect(ParkCategories,{Category:First(Park).Category.CategoryDetail.Text})

    Note that you should determine which record in the Park do you want to access to, I assume that you want to access to the first record.

    vqiaqimsft_1-1632467416444.png

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on 22 Sep 2021 at 14:29:57
    Re: Powerapps collections - drill down through 3 levels?

    Hi @AFE2E 

     

    Few troubleshoot items

    • Can you insert the label on the screen and set the text property to 

     

    Park.category.categoryDetail.Text​

     

    • Can you Share Park and category structure?
  • AFE2E Profile Picture
    11 on 22 Sep 2021 at 14:13:17
    Re: Powerapps collections - drill down through 3 levels?

    Hi, 

     

    I have tried your suggestion..

     

    AFE2E_0-1632319250366.png

     

    I get the following errors. 'Invocation of unknown or unsupported function' when hovering over the park.category section. Then I get 'Name isn't valid. The identifier isn't recognised' on categorydetail and 'Invalid use of '.' on /Text at the end

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on 22 Sep 2021 at 12:47:35
    Re: Powerapps collections - drill down through 3 levels?

    Hi @AFE2E 

     

    Looks like Categorydetail is a table. So we have to use First() even though you may have a single record.

     

    Category: Park.category.First(categoryDetail).Text

     

    Please share the error. It helps to troubleshoot.

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete