I have a problem how to keep value of portsElement[i].Id during selection change in ComboBox. I've tried to make global variable, but during selection change in ComboBox it's showing me undefined.
My first try was to make variable, but that variable kept only the last value in all ComboBox-es.
for (var i = 0; i < portsElement.length; i++) {
window['portId' + i] = portsElement[i].Id; //this is the variable I would like to keep for each loop
var cBox = new App.Components.ComboBox({
listeners: {
select: function (combo, record, index) {
UpdateElementRefDetails({ Id: window['portId' + i] }, function () {
me.el.unmask();
});
}
}
});
}