Update Data
- Last UpdatedOct 10, 2025
- 1 minute read
The updateData property is used for updating the widget data. The following are the only elements that you can update during runtime:
|
Element |
Datatype |
Default |
|
|---|---|---|---|
|
1 |
uom |
String. Maximum 1 line. Its whitespace is collapsed when it's null or empty. |
" " |
|
2 |
targetValue |
Numeric |
scaleMinimumValue |
|
3 |
value |
Numeric |
scaleMinimumValue |
|
4 |
lookupData |
You can update these elements individually or collectively. If the element name isn't provided or isn't found, no update is done to the element. If enableColumnBindings is enabled in the data property, it expects an updated data object to be sent through the lookupData property.
Example 1 | updateData without lookup
control.findByXmlNode("Widget1").widgetProperties.updateData = JSON.stringify(
{
uom: "ml",
targetValue: 900,
value: 750,
lookupData : // This will be ignored if enableColumnBindings is set to false. It can be removed.
{
"_id" : 12,
"_title" : "Filler 12",
}
});
Example 2 | updateData with lookup
control.findByXmlNode("Widget1").widgetProperties.updateData = JSON.stringify(
{
uom : "kg",
lookupData : // This will be ignored if enableColumnBindings is set to false. It can be removed.
{
"_id" : 12,
"_title" : "Filler 12",
"_uom":"ml",
"_target": 80,
"_value":55,
"_description": “Long text for comment",
},
});