lookupData
- Last UpdatedOct 10, 2025
- 1 minute read
The lookupData is an object that is part of the data property. It's used when the enableColumnBindings element is defined. Values for uom, targetValue, and value are fetched from the properties that are defined in columnNameMapping of this object. For example script, see the Example 2 | With lookup section.
Example 1 | Without lookup
control.findByXmlNode("Widget1").widgetProperties.data = JSON.stringify(
{
barSettings:
{
widgetTitle: "Entity 12",
enableColumnBindings: false,
showUOM: true,
uom: "ml",
showTarget: true,
targetValue: 900,
value: 750,
decimalPlaces: 0,
scaleMinimumValue: -1000,
scaleMaximumValue: 1000,
scale: 1,
numberOfDivision: 10,
controlBackgroundColor: "#FFFFFF",
backgroundColor: "#CCCCCC",
barColor: "#179D71",
ranges:
[
{ "value": 100, "color": "red" },
{ "value": 500, "color": "yellow" },
{ "value": 800, "color": "#00FF00" },
],
enableTimerRefresh: true,
timerRefreshRate: 30,
columnNameMapping: {},
},
lookupData: {},
});
Example 2 | With lookup
control.findByXmlNode("Widget1").widgetProperties.data = JSON.stringify(
{
barSettings:
{
widgetTitle: "Entity 12",
enableColumnBindings: true,
showUOM: true,
showTarget: true,
barColor: "#179D71",
scaleMinimumValue: 0,
scaleMaximumValue: 100,
scale: 1,
enableTimerRefresh: true,
timerRefreshRate: 30,
columnNameMapping:
{
"uomColumnName": "_uom”,
"targetValueColumnName": "_target”,
"valueColumnName": "_value”,
},
},
lookupData :
{
"_id" : 12,
"_title" : "Filler 12",
"_uom":"ml",
"_target": 80,
"_value":55,
"_description": “Long text for comment",
},
});