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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Change state definition based on value in numeric entry or other value widget

AS_9770512
5-Regular Member

Change state definition based on value in numeric entry or other value widget

Hi,

i have a state definition value for the value from a value display widget. Now i want to overwrite this state definition value (e.g. <30) and give a another value (e.g <20) which is defined by the user itself. 

 

I cannot change the state value property of the value widget even when i bind another value from a service to its source.It is not updating it. How can i achieve that? 

 

In this example it should take the color yellow instead of red because the thresholds are set as shown in the led widgets. The Statedefinition Values from the Value widget are binded to the same service as the led widgets. 

AS_9770512_0-1615994026942.png

 

1 REPLY 1
cbrandy-2
6-Contributor
(To:AS_9770512)

Hello,

I think that you can achieve that by modifying the StateDefinition entity through a service at runtime.

Resources["EntityServices"].UpdateStyleDefinition({
	name: undefined /* STYLEDEFINITIONNAME */,
	content: undefined /* JSON */
});

 Cyril

Top Tags