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 / Make visible which rec...
Power Apps
Answered

Make visible which record is selected in a gallery

(0) ShareShare
ReportReport
Posted on by 140

Hi All,

 

I have an app in tablet format (landscape). On the left side there is a gallery and on the right side there is a detail form which shows detailed information of one of the records on the left side.

 

I am looking for a way to make visible which record is selected in the gallery on the left side. For example I could make the text of selected record bold. (And of course set it to normal when another record is selected). How can I do that?

Categories:
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @AGroegelich 

    You can utilise the Fill, Color, TemplateFill, other properties of your gallery to do what you want. Most apps I've seen use the TemplateFill property. How to use any of these could be like this:

     

    Gallery1.TemplateFill = If(ThisItem.IsSelected, LightBlue)

     

    Use the If() statement on labels inside your gallery by adding it to the Fill or Color properties.

     

    On loading the screen for the first time the first gallery item will be LightBlue but that's because PowerApps will, by default, always select the first item in this instance.

     

    You can choose whatever color you like, I've just used LightBlue as an example.

  • emauerbach Profile Picture
    124 on at

    Haven't dealt with a gallery in that way, but I would guess that you'd need to set a context variable on select and modify the Fill property based on that condition. The OnSelect for the item: 

    UpdateContext({SelectedItem: GalleryDisplay.Selected});
    Navigate(ItemDisplay,ScreenTransition.None);

     

    Then the Fill property would look like:

    If(SelectedItem in {ItemId}, RGBA(255,0,0,20%), RGBA(0,0,0,0))
  • WarrenBelz Profile Picture
    156,576 Most Valuable Professional on at

    Hi @AGroegelich ,

    Please accept @Anonymous 's post - this is exactly what I do on all my galleries.

  • AGroegelich Profile Picture
    140 on at

    Hi Eelman,

    I wasn't aware of the TemplateFill property so I decided to do that. Works perfect for what I needed. Thanks.

  • AGroegelich Profile Picture
    140 on at

    Hi eauerbach,

    Thank you for your suggestion. Unfortutate I couldn't get it working. The {ItemId} is giving an error. Still something I have to learn what that is. I just started with PowerApps last week. I will keep it in mind as another solution.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard