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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to select only one...
Power Apps
Answered

How to select only one item inside a gallery which is embedded within another gallery

(0) ShareShare
ReportReport
Posted on by 1,247 Super User 2024 Season 1

Hello ! 

 

I am trying to build a tabular view in PowerApps using a gallery embedded (gallery2) within another gallery(gallery1). But I want to be able to select a single record inside the embedded gallery (gallery2)

 

I have highlighted gallery1 in yellow and gallery2 in red

Anonymous_Hippo_0-1628609841447.png

 

For example if i select 6 then only 6 should be selected and all other values selected inside gallery2 must be unselected.

 

Normally a user can select only one record per gallery but since i have embedded a gallery inside another gallery it becomes complicated

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous_Hippo 

    You will not be able to have an empty selection on the Gallery.  If there is no specific selection, then the first item will always be selected.

    You will need to do some tricky workarounds for this to work as you want.  Essentially, you will not be relying on the Selected property of the gallery but instead capturing the selection and then comparing.

     

    Example, your OnSelect of the nested gallery would be : UpdateContext({lclSelection: ThisItem.ID})

    Then, your TemplateFill property would be:

        If(ThisItem.ID = lclSelection, LightSteelBlue, Transparent)

     

    And, when you go to see what is "really" selected, you would refer to the snapshot variable, lclSelection, to get it - not the Gallery itself.

     

    I hope this is helpful for you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard