Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Set Field Color based on that Field's Value within Gallery

I have a gallery based on a Collection with a number of fields tracking values for several characteristics.  Let's say Day1_number_of_sparrows, Day1_number_of_hawks, .......,  Day2_number_of_sparrows, Day2_number_of_Hawlks....Day3..., etc.

Day# of incident type. 


I can set the color value if I set field by specific field hame like:   If(Day1_number_of_sparrows>12,Red,Blue), but then I need to do create each field individually.


Is there a way that I can reference each field's value generically so that I can use the same formula within each field to set format?Like:    If(FieldValueReference >12,Red,Blue).  "FieldValueReference" being some generic reference that wouuld work for any field in the Gallery record.

Level 10

Re: Set Field Color based on that Field's Value within Gallery

A neat way to do it would be to use a nested gallery in your existing gallery.  This way you would actually only have one label whose properties you would have to define.


The exact way in which you would do it would depend on your data structure and what the data source is.


Community Support Team
Community Support Team

Re: Set Field Color based on that Field's Value within Gallery

Hi @lknudson,


Since Day1_number_of_sparrows, Day1_number_of_hawks, .......,  Day2_number_of_sparrows, Day2_number_of_Hawlks....Day3..., etc. are all separated fields in the collection, to include them in the gallery control, each one field would be binded to one control. Did you mean that all fields about Day1 would be the same value, so you want to change all fields of Day1's color to the same? Or did I misunderstand your requirement? Please explain in detail with the example of your data. Maybe a screenshot would be even better.




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Set Field Color based on that Field's Value within Gallery

Hi Mona,


Tracking bird types each day over course of a day.  Each field shown is a distinct field in Collection.  I want to track # sightings per time period per day with weekly summaries per period and overall weekly sightings. I want Daily sightings > 5 and weekly summaries > 25 to be formatted with Red.  I can format each individual field with formula like: 


but I had hoped I might get a generalized formula to put into each field, like: 

If(Bird_Gallery.ThisItem.Value >5,Red,Blue)

But I haven't been able to create any general reference like that to work.





Here is a screen shot.WeeklyReport.jpg