Value Subscription
The value subscription widget is a simple widget to display value and change it.
Capabilities
Capability |
Support |
Comment |
|---|---|---|
Display current state of value.ospp |
||
Change value of an initialized value.ospp |
The value must be subscribed with a |
|
Change value of an uninitialized value.ospp |
Currently this is not supported |
|
Inspect a value JSON content in a modal |
Available when the field holds a valid JSON string |
List of configuration files
Filename |
Short description |
Format |
Link to documentation |
|---|---|---|---|
dashboard.view#ValueSubscriptionWidget |
Defines the ValueSubscriptionWidget widget global settings |
json |
List of examples
Short description |
Link to documentation |
|---|---|
Create a random value generated by a remote connector |
|
Insert audit logs from scripts |
Display values
The values are declared in the Dashboard view in the valueSubscription field. To be readable, the right must be set to READ
Inspect JSON content
Expanding a subscribed value reveals its details (id, name, description, content, error, type and timestamp). When a field holds a valid JSON string — typically the value content — a Show JSON icon appears next to its copy icon. Clicking it opens the parsed value in a modal, using the same collapsible, theme-aware viewer as the Json widget.
Null values
When a value.ospp holds a null value, the system returns undefined. This behavior is consistent across all supported data types:
TEXT
DECIMAL
INTEGER
BOOLEAN
In other words, a null value is not type-specific and is always mapped to undefined.
Boolean display behavior
For BOOLEAN values, the user interface displays false next to the toggle in two cases:
when the actual value is false
when the value is undefined (originating from a null value)
This visual representation does not distinguish between false and undefined. The effective state is determined solely by the underlying value, which is the authoritative source.
Widget context
Operations
subscribeTo(value: string | string[]): subscribe to one or more values.
unsubscribeTo(value: string | string[]): unsubscribe to one or more values.