Skip to main content
Microsoft logo
Power Apps
    • AI Builder
    • Automate processes
    • Azure + Power Apps
    • Build apps
    • Connect data
    • Portals
  • Pricing
    • Overview
    • Become a Partner
    • Find a Partner
    • Find partner offers
    • Partner GTM Resources
    • Blog
    • Customer stories
    • Developer Plan
    • Documentation
    • For IT Leaders
    • Roadmap
    • Self-paced learning
    • Webinars
    • App development topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power Apps Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Apps
    • Building Power Apps
    • Microsoft Dataverse
    • AI Builder
    • Power Apps Governance and Administering
    • Power Apps Pro Dev & ISV
    • Power Apps Portals
    • Connector Development
    • Power Query
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Community Blog
    • Power Apps Community Blog
    • Galleries
    • Community Connections & How-To Videos
    • Community App Samples
    • Webinars and Video Gallery
    • Canvas Apps Components Samples
    • Kid Zone
    • Business Value Webinars and Video Gallery
    • Emergency Response Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Ideas
    • Power Apps Ideas
    • Community Engagement
    • Demo Extravaganza 2021
    • Demo Extravaganza - Components 2021
    • Power Apps Community Demo Extravaganza 2020
    • Experimental
    • Error Handling
    • Power Apps Experimental Features
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Power Apps Community
    • Galleries
    • Webinars and Video Gallery
    • PowerApps Sub Galleries: Expanding and Collapsing

    PowerApps Sub Galleries: Expanding and Collapsing

    12-05-2017 00:17 AM

    PaulD1
    Community Champion
    4417 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    PaulD1
    PaulD1 Community Champion
    Community Champion
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    PowerApps Sub Galleries: Expanding and Collapsing

    ‎12-05-2017 12:17 AM

    How to expand and collapse a nested gallery / sub-gallery. Following on from my video on creating nested galleries here is a demo of how you can set your sub-galleries to expand or collapse when you click on the parent gallery. Two methods are shown, one allowing you to expand a single sub-gallery at a time and one allowing you to expand/collapse whichever sub-galleries you choose.
    The second option makes use of a collection and the functions Collect, Remove, CountRows and IF.

    watch?v=VNnaymeBN7g

    Preview file
    2 KB
    Labels:
    • Labels:
    • Webinars & Demos
    Message 1 of 6
    4,417 Views
    2 Kudos
    Reply
    • All posts
    • Previous Topic
    • Next Topic
    Lionel
    Lionel Helper I
    Helper I
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎01-20-2018 09:45 AM

    Hello and thank you for the share.

     

    Is there a limitation in the number of items. I use your solution for my own need and I face up an issue while drilling down the upper list (groupedItems)

    - in dev mode : it crashes ("WebAuthoring abnormal termination.") / see error message detailed below

    - In production there is no error message but the list of grouped items is not very well displayed after some lines

     

    Detailed error massage :

    WebAuthoring abnormal termination.
    Client date/time: 2018-01-20T17:27:06.441Z
    Version: 2.0.750 (v2.0.750.64884645)
    Session ID: f3d37a67-df0a-46f6-8193-90e138358b4b
    description: {"error":{"isTrusted":true,"detail":{"exception":{}},"message":"Uncaught TypeError: Cannot read property 'style' of null","filename":"https://cdn-paaprodweu.azureedge.net/v2.0.750.64884645/studio/ctrllib/gallery/js/gallery.js?v=2.0.75... TypeError: Cannot read property 'style' of null","setPromise":"[function]","exception":{}}
    stack: null
    errorNumber: 0
    errorMessage: Uncaught TypeError: Cannot read property 'style' of null

    Message 2 of 6
    4,392 Views
    0 Kudos
    Reply
    PaulD1
    PaulD1 Community Champion
    Community Champion
    In response to Lionel
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎01-21-2018 01:01 AM

    Hi @Lionel 

     

    Yes, there appears to be a bug in the designer which means that it will often crash when using the Gallery/Subgallery approach with a larger dataset. For development/testing, try to work with a small dataset to prevent this.

     

    If text wraps over several lines then it may not display well (remember we count the number of records and then multiply by a line height - so if the line height changes or the text doesn't fit on a line it doesn't look great). Assuming the records fit on single lines I've found it *mostly* looks OK, though I have seen the occasional 'glitch' especially in the Web viewer and on Windows Mobile. iOS and Android seem to suffer less from display issues in my experience.

    Message 3 of 6
    4,389 Views
    0 Kudos
    Reply
    Lionel
    Lionel Helper I
    Helper I
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎01-24-2018 02:18 PM
    Thank you for your answer. Unfortunately I could not reduce the dataset ; I will find another way
    Message 4 of 6
    4,380 Views
    0 Kudos
    Reply
    PaulD1
    PaulD1 Community Champion
    Community Champion
    In response to Lionel
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎01-27-2018 09:49 PM

    Hi @Lionel

     

    You only need to reduce your dataset for development purposes. I just use a Filter or a FirstN (https://docs.microsoft.com/en-us/powerapps/functions/function-first-last) on the gallery's item property to ensure I am working with a dataset small enough that it won't crash the web designer. When finished designing, remove the Filter or FirstN and Publish.

     

    Hope that helps

    Paul

    Message 5 of 6
    4,360 Views
    0 Kudos
    Reply
    Lionel
    Lionel Helper I
    Helper I
    In response to PaulD1
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎01-28-2018 11:12 PM

    Thank you @PaulD1. I was able to workaround the dev issue. Major bug was in production: list is misdisplayed after the first screen (some lacks). I tested on web chrome, poweraps IOS and android with the same results.

     

    I choose to presenting data in another way 🙂

    Message 6 of 6
    4,356 Views
    0 Kudos
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Automate
    • Power Virtual Agents

    Power Apps

    • Sign in
    • Sign up

    Browse

    • Sample apps
    • Services

    Downloads

    • Studio
    • iOS
    • Android

    Learn

    • Documentation
    • Support
    • Community
    • Give feedback
    • Blog
    • Partners

    • © 2022 Microsoft
    • Follow Power Apps
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks