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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to change gallery ...
Power Apps
Suggested Answer

How to change gallery item color based onChange on a combobox

(1) ShareShare
ReportReport
Posted on by 39
Hi everyone,

I am trying to have it so if an individual item's combobox in a PowerApp gallery is changed, that specific items box is turned to green. Is there a way of achieving this?
Categories:
I have the same question (0)
  • Suggested answer
    Amol-Kavnekar Profile Picture
    123 on at
     
    Yes, you can achieve this by using conditional formatting within the gallery to change the background color of a ComboBox when its value is changed. Here's how you can do it:
    • Screen OnVisible Property:

      ​​​​​​​ClearCollect(ComboBoxChanges, AddColumns(Gallery1.AllItems, "Changed", false))
       
    • ComboBox OnChange Property:

      Patch(
      ComboBoxChanges,
      LookUp(ComboBoxChanges, ID = ThisItem.ID),
      {Changed: true}
      )
       
    • ComboBox Fill Property:

      If(
      LookUp(ComboBoxChanges, ID = ThisItem.ID).Changed,
      Color.Green,
      Color.White
      )
       
      If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
       
       
  • AnthonyIsAdulti Profile Picture
    39 on at
    Hi, what would the "Changed" be? I keep getting expected identifier name when I put it into my code.

    ​​​​​​​Edit: I got it to work thanks!
  • Suggested answer
    dmb Profile Picture
    12 on at
    Do you want to track for dirty changes in a gallery where every record is exposed by editable fields?
    If so, on the screen load store the collection of records, and use formula for the fill / border color properties, etc. of the gallery item. Formula would compare this record's field value with the one in the collection (filtered by its GUID) and return different colors for true/false outcome.
    When you patch the records, reload the screen (navigate, etc.).

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard