Skip to main content
Mar 22, 2019 8:26 AM UTC
Solved

how to change color of text/background of items in list/grid dynamically?

hi all,

let me explain my use case,i have three list, list-A contains all the names of students in class, list-B contains names of students present and list-c contains the names of students absent. traditionally we can show two list to differentiate present students and absent students. but i want to show it in one list by color coding, have the text/background for present names as 'green' and absent names as 'red'.

 

use case.png

PaiChungAnswer
Mar 26, 2019 1:37 PM UTC

State Based Definitions is either based on Numerical Range or based on a Match that match setup can be numerical or string.

http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FComposer%2FVisualization%2FStyleandStateDefinitions.html

 

3 replies

Mar 22, 2019 12:51 PM UTC

Have you tried using State Based Definitions? I think that should work.

What you can do in the service that provides the data, you can derive what 'state' a particular entry needs to be and trigger your State Based Definitions on that.

charanAuthor
Mar 26, 2019 8:54 AM UTC

hi @PaiChung,

i am new to this platform and technology,

state based definition takes in only numeric value and i am trying to compare it with a text/string.

    

PaiChungAnswer
Mar 26, 2019 1:37 PM UTC

State Based Definitions is either based on Numerical Range or based on a Match that match setup can be numerical or string.

http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FComposer%2FVisualization%2FStyleandStateDefinitions.html