cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to apply state-based formatting using a setpoint as reference?

AZ_10002866
5-Regular Member

How to apply state-based formatting using a setpoint as reference?

Hello amigos,

 

I'm a noob in Thingworxs and Im trying to color a grid cell (variable value) using as reference his setpoint.

Does anyone know how to do it? Formatting just allows numbers, or Is it possible pass a variable name as value? 

 

Thank you in advance masters!

1 ACCEPTED SOLUTION

Accepted Solutions

Limits for numeric states are only literal values when you create them using the state definitions ui. You can try the following alternatives:

  1. If you are using the advanced grid widget, you can specify a runtime configuration via the Configuration property where you can define the state formatting limits within a service. This capability isn't well documented, but you can find some good examples in the entities provided in this help article.
  2. You can add an additional string column and calculate its value in the service you use to populate your grid, based on the value of number properties. This column could take values like GreenYellow and Red. Then, when you configure your grid, you can hide this column but you can use it as the dependent field for your numeric column and just use a string-based state formatting. The community post linked by @bchaudhary explains this approach.

 

View solution in original post

5 REPLIES 5

Hi @AZ_10002866 , 

As per my understanding you are planning to colour only a single grid cell i.e. reference point.

 

Regards

Bhawna

AZ_10002866
5-Regular Member
(To:bchaudhary)

Yes, example, Speed(random variable) should colored base on < 50 green (SpeedSetPoint), < 75 yellow (SpeedSetPoint * 1.5), the rest should be red. 

The control limits should take the variable SetPoint instead direct number, in order to, when the SetPoint changes the color boundaries change too.

Hi @AZ_10002866 , 

You can do that by doing state formatting. In that different styles can be applied on the basis of given conditions.

Attaching the reference document for further clarification.

state formatting and styling  

2 

Regards

Bhawna

Hi @AZ_10002866

 

Kindly check the given link.

 check this post 

 

Regards

Bhawna

Limits for numeric states are only literal values when you create them using the state definitions ui. You can try the following alternatives:

  1. If you are using the advanced grid widget, you can specify a runtime configuration via the Configuration property where you can define the state formatting limits within a service. This capability isn't well documented, but you can find some good examples in the entities provided in this help article.
  2. You can add an additional string column and calculate its value in the service you use to populate your grid, based on the value of number properties. This column could take values like GreenYellow and Red. Then, when you configure your grid, you can hide this column but you can use it as the dependent field for your numeric column and just use a string-based state formatting. The community post linked by @bchaudhary explains this approach.

 

Top Tags