How to apply state-based formatting using a setpoint as reference?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Design
-
TWX Dev Portal
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Limits for numeric states are only literal values when you create them using the state definitions ui. You can try the following alternatives:
- 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.
- 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 Green, Yellow 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @AZ_10002866 ,
As per my understanding you are planning to colour only a single grid cell i.e. reference point.
Regards
Bhawna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Regards
Bhawna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Limits for numeric states are only literal values when you create them using the state definitions ui. You can try the following alternatives:
- 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.
- 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 Green, Yellow 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.
