Wrapped java.lang.NullPointerException
Below is my code:
//creating an infotable
let Log = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: "InfoTable",
dataShapeName: "DataShape"
});
//Defining date variable
var currentDate;
//assigning valueList variable to my infoTable property that contains values (current it only has one row)
var valuesList = Things["TestThing1"].infoTableThingProperty;
//loop through the infotable above
for(var i=0; i<valuesList.length; i++){
// new object
newEntry = {
duration:valuesList[i].duration,
source: valuesList[i].Source,
Name: valuesList[i].Name,
Type: valuesList[i].Type,
StartTime: valuesList[i].StartTime,
EndTime: valuesList[i].faultEndTime,
Voltage: valuesList[i].Voltage,
Text: valuesList[i].Text
};
//adding my object values to the infotable
Log.AddRow(newEntry);
}
//adding my infotable to the stream
var newLog = Things["SinkWorx.PwrSupplyError_Stream"].AddStreamEntries({
values: Log /* INFOTABLE {"dataShape":"StreamEntryWithValues"} */
});
//output result
let result = Log;
I keep getting the error above, I am not sure why.
Does anyone know how I can fix it?
Kind Regards,
TB

