title: SAPUI5 table - changing font size and font color conditionally (in SAP) - how to do it right?
body: <p>Due to the fact that there are lots of threads on this on SCN and also here where People are trying to find out how to Change font Color and font size conditionally, you will find a solution manipulating the CSS or the DOM via jQuery - thats not the way it is supposed to be.</p>
  
  <p>I want to Show the way how to set this up, Controlling Color and font by the SAP backend!</p>
  
  <p>Easy example, you are showing negative and positive values in an SAPUI5 table - lets say positive values:</p>
  
  <p>You Need to more attributes in your entity, one for design and one for class:</p>
  
  <p><img src="https://i.stack.imgur.com/jiWd3.png" alt="enter image description here"></p>
  
  <p>Then you enhance your method in ABAP with the respective values (explained later in Detail which values are available):</p>
  
  <p><img src="https://i.stack.imgur.com/GS3Im.png" alt="enter image description here"></p>
  
  <p>and finally in UI5 table Definition a reference:</p>
  
  <p><img src="https://i.stack.imgur.com/3mRjh.png" alt="enter image description here"></p>
  
  <p>and there you go, highlighted one single row with a positive meaning (sorry for the black ... it is not meant for the public ;-) all other rows are not bold and not green)
  <img src="https://i.stack.imgur.com/znAVS.png" alt="enter image description here"></p>
  
  <p>Available Options in SAP:
  <a href="https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.commons.TextViewDesign.html" rel="nofollow noreferrer">https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.commons.TextViewDesign.html</a>
  <a href="https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.commons.TextViewColor.html" rel="nofollow noreferrer">https://openui5.hana.ondemand.com/#docs/api/symbols/sap.ui.commons.TextViewColor.html</a></p>