Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Reset selection in a nested gallery

(0) ShareShare
ReportReport
Posted on by 22,025 Super User 2025 Season 1

Hi All,

 

I have a nested gallery that is made visible when based on the value of the "Expand" column in the data source. As you may guess, I use this to expand/collapse the view to show/hide items in the nested gallery that are related to the item in the main gallery if there are any. 

 

Also I'm using conditional formatting to highlight the selected item.

 

TemplateFill = RGBA(198,239,206,If(ThisItem.IsSelected,1,.7)

 

Ideally between the main and nested gallery, only 1 item should be showing as selected.

 

Based on the Unselected a gallery item? - Power Platform Community (microsoft.com) topic I have set up a solution where onSelect in either galleries resets the other gallery:

 

default = {}
OnSelect = Set(var,ThisItem); Reset(Other Gallery)

 

This seems to be working for the main gallery (1), but not for the nested gallery (2):

BCBuizer_0-1634291493524.png

I tried verifying if an item has been selected at all in the nested gallery, but this does not show a value in any case, selected or not:

 

text = NestedGallery.Selected.Title

 

Your thoughts on how to make this work are most welcome.

  • Verified answer
    BCBuizer Profile Picture
    22,025 Super User 2025 Season 1 on at
    Re: Reset selection in a nested gallery

    Hi All,

     

    Found the issue: The templatefill of both the main and the sub gallery were overlapping. As a result, the combined alpha value exceeded 1, hence it looked as if an item was selected, but it wasn't. 

     

    I worked around the issue by inserting a rectangle in the main gallery with the same conditional formatting.

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,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard