How to conditionally set  background colour of table cell?

How to conditionally set  background colour of table cell?

  
How to conditionally set background colour of table cell? Any ideas ?
Dear Orlando,

For conditional formats we suggest the use of Extended Properties. In the case in hand, you would leave the Cell’s native “Style” property to “(none)” (as this kind of formatting is always unconditional), open the Extended Properties’ dialog for your required Cell and add a property style with a value similar to

FormatBoolean( boolean-expression, "background-color: #00ff00", "" )

In this particular case, if boolean-expression is true, the Cell’s background will be green, while if if boolean-expression is false, the background will be left unchanged (i.e. it will use the page or the table’s background colour).

Hope this helps.

Best regards,


Miguel

Hi Miguel - Extended property is fine if there are only 2 colors but If there are 3 or 4 colors then what to do??

Hi Sandeep,


You can add extra logic to that if condition but it would be confuse to use and manage.

On your case i would build an action with the function property set to yes so you can call it on the extended property. Something like:


So you would put something like:

"background-color = "+GetColorCell(MyParameter)


Let me know if it works.

Cheers,

Henrique