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

8-Gravel

## Problem defining state definition in thingworx 8.4.3

Hello, I want to create state definition for my shape. but I am only be to define only two types. Please refer the following image. I want to define a style for a range of values. Eg - Green for 1, red for 0 and yellow for  greater than 2

1 ACCEPTED SOLUTION

Accepted Solutions
22-Sapphire I
(To:gourinaik98)

If just 0/1 yes String/Value

You only define for either 0 or 1 and the other one will be default

8 REPLIES 8
19-Tanzanite
(To:gourinaik98)

If you need to achieve

Green for 1, red for 0 and yellow for  greater than 2

you can do it by using a String/Value state instead of a Numeric one.

Set the first state to String/Value 1 and the desired style

Set the second state to String/Value 2 and the desired style

Set the default state to the desired style

Hope this helps

Christophe

22-Sapphire I
(To:gourinaik98)

8-Gravel
(To:PaiChung)
I tried that, it still shows less than or less than equal to only

22-Sapphire I
(To:gourinaik98)

Correct, that is how it is intended.

Your state definitions for number ranges always has to be defined with the approach of

a < b <= c < default

the default state will be anything above the last state you define.

8-Gravel
(To:PaiChung)
Yeah, so how do we define a?

22-Sapphire I
(To:gourinaik98)

sorry correction you'll see it as

<a - State 1

<=b - State 2

<c - State 3

default

So you define the first cut off and anything below that will be 'state 1' etc.

8-Gravel
(To:PaiChung)
Okay I've got it. But in my case, the value is 0 or 1. So in that case, as
@cmorfin mentioned, I have to define it as string/value correct?