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 / Dynamically change the...
Power Apps
Answered

Dynamically change the color of an icon in a gallery

(0) ShareShare
ReportReport
Posted on by 79

I have a simple gallery that displays a priority as for each request as a 1,2 or 3.  I was assuming I could use this value to change the color of an icon for each row in the gallery so the priority 3's could be red.   I have coded the color property for the icon based off of the datasource.field value and also off of the control value listed on each tile,  both seem to be ignored.   Is this not possible.  Many thanks. 

Categories:
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @nhale 

    In the Color of the icon, put this

    If(
     ThisItem.Priority=3, 
     Red,
     YourOtherColour
    )

    You did not mention what the standard colour was.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    nhale Profile Picture
    79 on at

    Thanks,   that is exactly what I have but it does not work, so I thought maybe this was not possible in a gallery.  I tried to change the property of another control using a different data point it that worked, so something about changing the borderfill on the icon or something about my field it does not like.  I'll figure it out, just needed to know it was possible.  Thanks again.

  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    @nhale ,

    I can assure you it works and I do it on a very regular basis. I can only answer your post with the information you provide and if you have a Numeric Priority number of 3 in the same item in the Gallery, the colour will certainly change to Red.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard