Access Second Infotable From UpdatePropertyInfo
Good morning everybody,
I need to access a second infotable (Lets call it "Reasons") from the updateproperty of a first one (Lets call it "Data"), and I can't find how. Since both infotables have a very different size (4-10 rows vs 600-4000), I didn't want to send the data on the same infotable. I know that I could read one, save the data on a global level and read the second one, but the problem is that my "Reasons" one conditions the "Data" one, so I would always need to be sure that the updateproperty of the "Reasons" goes first, and for that, as far as I know, the only solution would be to use 2 different services, one after another, to feed this infotables. And truth be told, I don't like that solution too much since I am not the only person that might use this widget.
Do you know if there is any syntax to do something like this? I have attached what I was trying to do, which might help to understand what I mean.
Regards,
Josue Nanin
if (updatePropertyInfo.TargetProperty === 'Data') {
var AxisLabel = this.getProperty('AxisLabel');
var MinutesValueField = this.getProperty('Minutes');
console.log("updatePropertyInfo Data");
console.log(updatePropertyInfo);
var dataRows = updatePropertyInfo.ActualDataRows;
var nRows = dataRows.length;
var datagenerated = [new Object()];
var MinutesValues = [];
for (var rowNumber = 0; rowNumber < nRows; rowNumber++) {
var row = dataRows[rowNumber];
var MinutesValue = row[MinutesValueField];
if (MinutesValue === undefined){var MinutesValue = null;}
MinutesValues.push(MinutesValue);
}
updatePropertyInfo.TargetProperty === 'Reasons'
var ReasonValueField = this.getProperty('ReasonValue');
var ReasonColorField = this.getProperty('ReasonColor');
console.log("updatePropertyInfo Reasons");
console.log(updatePropertyInfo);
console.log('ReasonValue');
console.log(ReasonValue);
console.log('ReasonColor');
console.log(ReasonColor);
var dataRows = updatePropertyInfo.ActualDataRows;
var nRows = dataRows.length;
var datagenerated = [new Object()];
var ReasonsValues = [];
var ReasonColors = [];
for (var rowNumber = 0; rowNumber < nRows; rowNumber++) {
var row = dataRows[rowNumber];
var ReasonsValue = row[ReasonValueField];
var ReasonColor = row[ReasonColorField];
if (ReasonsValue === undefined){var ReasonsValue = null;}
if (ReasonColor === undefined){var ReasonColor = null;}
ReasonsValues.push(ReasonsValue);
ReasonColors.push(ReasonColor);
}
console.log('ReasonsValues on the array');
console.log(ReasonsValues);
console.log('ReasonColors on the array');
console.log(ReasonColors);

