Expand my Community achievements bar.

Colour coding calculated values

Avatar

Former Community Member
Hi<br />I'm sure I've seen something posted on this before somewhere, but now cannot find it. I have a numeric field which calculates (via formcalc) the product of two other numeric fields. I would like to know if it is possible to colour code the calculated value for three different ranges e.g. Red for a value n>=15; Orange for 8=<n<15; Green for n<8. Any help is much appreciated.<br /><br />Many thanks
1 Reply

Avatar

Former Community Member
Hi,



Try to use the following code to set the color:



NumericField.font.fill.color.value = "255,0,0"; (that would be for red). **This is javascript** You have to do the calculation in javascript as well.



You can place this statement within if statements specifying the boundary conditions for your ranges.



Catherine