Change state definition based on value in numeric entry or other value widget
Mar 17, 2021
03:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mar 17, 2021
03:23 AM
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.
Labels:
- Labels:
-
Coding
-
Examples
-
Mashup-Widget
-
Troubleshooting
1 REPLY 1
Mar 19, 2021
05:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Mar 19, 2021
05:04 AM
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
