cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
snipesnab
Helper II
Helper II

Gallery in PowerApps - Change item color based on value of item

Hi There,

 

I would like to know how to change the color of a gallery item (cell) if the value within that item is "Complete and closed" - please see attached pic. I only want that gallery item cell to change color, I'm not sure if this is possible. If I cannot change the individual cell in the gallery, how would I change the fill color of a form that gets its value from the gallery e.g. 'Item' is 'Gallery.selected' if the value of a field in the gallery is "Complete and closed"?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@snipesnab 

Please have a look at the TemplateFill property for your Gallery.

In that property you can set a formula such as this:

   If(ThisItem.Status = "Complete", Green, Transparent)

 

This would set the row to green if the text Status column is set to Complete.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@snipesnab 

Please have a look at the TemplateFill property for your Gallery.

In that property you can set a formula such as this:

   If(ThisItem.Status = "Complete", Green, Transparent)

 

This would set the row to green if the text Status column is set to Complete.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
snipesnab
Helper II
Helper II

Spot on - thanks!

Hi @RandyHayes ,

In my case, I am working with powerapps dashboard which has a gallery. My Datasource is sharepoint. My gallery calculates the RAG Colour for all the fields and displays it (eg, Time, financial, efficiency are the labels and the respective fields have RAG colors(red, green, amber). Time category has two values to be compared(schedule & commitment). If prjmethod.text ="agile" commitment rag must be viewed in gallery or else schedule rag must be viewed in gallery. This prjmethod differs for every project. Is there any way to change the rag color based on the prjmethod condition.

Any help would be greatly appreciated.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,477)