Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

3rd Level Nested Gallery

(6) ShareShare
ReportReport
Posted on by

Hi,

 

I can able to create Gallery inside a Gallery, but I am not able to create 3 levels of galleries. How can i approach it ? Whenver I tried to insert a gallery inside a gallery 2, its reflecting into Active Screen.

 

 

 

.

Categories:
  • Suggested answer
    SteveEsps Profile Picture
    4 on at
    3rd Level Nested Gallery
    I was able to solve this using the new Paste code (preview). I first created two nested galleries, then selected the View code (preview) and copied the text.
    I simply duplicated the code that made the first child gallery and tab it over for the third one. 
     
     
     
    Result:
     
    Example code.
    - Gallery9:
        Control: Gallery
        Variant: variableTemplateHeightGallery
        Properties:
          DelayItemLoading: =true
          Layout: =Layout.Vertical
          LoadingSpinner: =LoadingSpinner.Data
          TemplateSize: =280
          X: =40
          Y: =40
        Children:
        - Gallery10:
            Control: Gallery
            Variant: variableTemplateHeightGallery
            Properties:
              DelayItemLoading: =true
              Height: =280
              Layout: =Layout.Vertical
              LoadingSpinner: =LoadingSpinner.Data
              TemplateSize: =280
              Width: =630
            Children:
                - Gallery11:
                    Control: Gallery
                    Variant: variableTemplateHeightGallery
                    Properties:
                      DelayItemLoading: =true
                      Height: =280
                      Layout: =Layout.Vertical
                      LoadingSpinner: =LoadingSpinner.Data
                      TemplateSize: =280
                      Width: =630
  • devfactoru Profile Picture
    2 on at
    Re: 3rd Level Nested Gallery

    I also ran into this limitation, and it came as a big surprise. I was not expecting it! This rendered our app design useless. We need to find a workaround or use SPFx instead, which is not ideal because it severely complicates solution architecture and changes development, deployment, and maintenance requirements.

  • leden Profile Picture
    26 on at
    Re: 3rd Level Nested Gallery

    I tried to solve it by creating a custom component containing a gallery, but unfortunately that did not work (just posting that to save other people the time of trying the same trick).

  • annazur Profile Picture
    6 on at
    Re: 3rd Level Nested Gallery

    Hi Carlos,
    I have scenario where i have sections with questions and different response type (text, single select, multi select). For the visual purposes i'd like to display multi select as gallery with checkboxes.
    I actually managed to achieve neesting the 3rd level gallery using visual studio code (by adding gallery code to the screen code) and then merging the screen code into the ADO Repo. Is is visible in the app and it seems to function well. 
    1st level gallery:  Sections - in this one i display the section name that comes from Section Table and the Questions gallery 

    2nd level gallery : Questions (in this one i display question and response area in case of text respose or in case of single choice)
       3rd level gallery: Multiselect response - i show this gallery inside of  Questions gallery for the scenario when     the response is multiselect, 
    I filter each of child galleries base on parent guid that i store in hidden label. 

    annazur_0-1716887320828.png

    annazur_1-1716887634180.png

     

    My question is, are there any risks or limitations that comes with my aproach? Is this something that you would advise not to implement? It seems to work and I haven't seen any issues so far. 

  • nBow Profile Picture
    46 on at
    Re: 3rd Level Nested Gallery

    IF your galleries are side by side like that you can try to have the second gallery not nested and have it sort its items based on the selected item in the first gallery, using gallery.selected, I did this in one of my apps for having one item select the same item in another gallery with the same id.  Just use a variable and store the selected item id in one gallery or the location or whatever type of data then filter the next gallery based on that variable.

  • nBow Profile Picture
    46 on at
    Re: 3rd Level Nested Gallery

    Honestly there should be no limit on nested galleries. Vertical and Horizontal scrolling aren't use cases imo. You could easily think about a use case that needs more nested galleries. For example if I'm designing an app for a storage room where items are stored in my database as their cage and shelf, if I want an accordian list that sorts by cage and then shelf when the list expands and then you can see the items, you would already need more than 2 deep for galleries. Expand that sorting further to boxes on shelves or drawers and you need even more nested galleries. There's many limitations that seem to be in place on power apps that shouldn't be there, because they aren't or at least shouldn't be a performance hit. The only time limitations of any kind make sense is if they would be a major reduction to performance of an app.

    Also the reason your expample of using nested galleries for vertical and horizontal scrolling isn't a use case is that you've already added vertical and horizontal containers that can get this effect with a single gallery. Nested galleries should be thought of in the sense of sorting by data types, and you can have any number of data types in one record, location, value, date, etc. There should be no nested limitations. There should be no delegation issues with sharepoint either, every query should be treated the same on the back end, whether it's using in operator = < etc. 

  • Community Power Platform Member Profile Picture
    on at
    Re: 3rd Level Nested Gallery

    Hi! Here the same.

    I have two galleries. The left one filters the right one. In that one, I have a nested gallery and a html component. I need to nest another gallery inside the second nested gallery 'cause the form generated in html there are three levels of information. This is more or less the info map: One director->Several managers ->Several Customers. All the info is got from the same sharepoint list. I need all this info in the same gallery, cause clicking the button makes the whole right gallery selected and onselect property of that gallery,starts looping all the rows which run a powerAutomate which sends the html to the flow. Im stucked in this point of the app and no clue how I should keep going if the 3rd nested feature does not exist.

    saneamiento.png

  • LuisPertence Profile Picture
    13 on at
    Re: 3rd Level Nested Gallery

    YES! 3rd level ASP please!!

  • TonyAdrian Profile Picture
    28 on at
    Re: 3rd Level Nested Gallery

    I also have a need for this 3rd Level Nested Gallery - I have many applications where this is a must have and without this feature it makes makes it difficult to offer PowerApps as a viable solution for my customers. It would seem MS would offer this after all these years. 

  • Tono_Analyst2 Profile Picture
    125 on at
    Re: 3rd Level Nested Gallery

    Any updates on this @CarlosFigueira ? 

     

    Managing the scrolling aspect is not a complex task. It would be helpful if this feature could be enabled and users can manage the scrolling if need be. 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard