Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Model Driven MES 7​.0

Data

  • Last UpdatedOct 10, 2025
  • 2 minute read

On initial load, the Merge widget uses the data property to enable the onInitialize event and set the input for the widget. The following script passes expected input properties into the widget. The datasets are based on the lookup configuration.

Example

var mergeData =

{

leftEvent: {

startDateTime: "2022-06-11T03:00:00Z",

endDateTime: "2022-06-11T04:30:00Z",

color: "red",

reason: "left event",

},

currentEvent: {

startDateTime: "2022-06-11T04:30:00Z",

endDateTime: "2022-06-11T05:30:00Z",

color: "green",

reason: "current event",

},

rightEvent: {

startDateTime: "2022-06-11T05:30:00Z",

endDateTime: "2022-06-11T06:00:00Z",

color: "blue",

reason: "right event",

},

};

control.findByXmlNode("Widget1").widgetProperties.data = JSON.stringify(mergeData);

Additional scenarios for input properties

In the following script, the input properties include the current and left events, which means that the selected event is already the last event in a series of events. In this scenario, only the Merge Left button is enabled.

var mergeData =

{

leftEvent: {

startDateTime: "2022-06-11T03:00:00Z",

endDateTime: "2022-06-11T04:30:00Z",

color: "red",

reason: "left event",

},

currentEvent: {

startDateTime: "2022-06-11T04:30:00Z",

endDateTime: "2022-06-11T05:30:00Z",

color: "green",

reason: "current event",

}

};

control.findByXmlNode("Widget1").widgetProperties.data = JSON.stringify(mergeData);

In the following script, the input properties include the current and right events, which means that the selected event is the first event in a series of events. In this scenario, only the Merge Right button is enabled.

var mergeData =

{

currentEvent: {

startDateTime: "2022-06-11T04:30:00Z",

endDateTime: "2022-06-11T05:30:00Z",

color: "green",

reason: "current event",

},

rightEvent: {

startDateTime: "2022-06-11T05:30:00Z",

endDateTime: "2022-06-11T06:00:00Z",

color: "blue",

reason: "right event",

}

};

control.findByXmlNode("Widget1").widgetProperties.data = JSON.stringify(mergeData);

In the following script, the input properties include only the current event, which means that the selected event is the only event. In this scenario, both Merge Left and Merge Right buttons are disabled.

var mergeData =

{

currentEvent: {

startDateTime: "2022-06-11T04:30:00Z",

endDateTime: "2022-06-11T05:30:00Z",

color: "green",

reason: "current event",

}

};

control.findByXmlNode("Widget1").widgetProperties.data = JSON.stringify(mergeData);

TitleResults for “How to create a CRG?”Also Available in