updating entries in datatable
Why both of these codes are not updating the entries in datatable. it is not showing error as well. Someone please tell me how to approach this code.
1. var params5 = {
infoTableName : "InfoTable",
dataShapeName : "MACMON_ProductionPlanDT_DS"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(MACMON_ProductionPlanDT_DS)
var updateDT = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params5);
updateDT.ToolHistoryID=rowDT.ToolHistoryID;
updateDT.MachineName=MachineName;
updateDT.PlannedTimeStart=rowDT.PlannedTimeStart;
updateDT.PlannedTimeEnd=rowDT.PlannedTimeEnd;
updateDT.QualityScore=resultDT.rows[i].QualityScore;
updateDT.QualityScoreUpdatedBy=QualityUpdatedBy;
Things[productionPlannerDT].UpdateDataTableEntries({
sourceType: undefined /* STRING */,
values: updateDT /* INFOTABLE */,
location: undefined /* LOCATION */,
source: undefined /* STRING */,
tags: undefined /* TAGS */
});
-------
2. var params5 = {
infoTableName : "InfoTable",
dataShapeName : "MACMON_ProductionPlanDT_DS"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(MACMON_ProductionPlanDT_DS)
var updateDT1 = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params5);
var updateDT = new Object();
updateDT.ToolHistoryID=rowDT.ToolHistoryID;
updateDT.MachineName=MachineName;
updateDT.PlannedTimeStart=rowDT.PlannedTimeStart;
updateDT.PlannedTimeEnd = rowDT.PlannedTimeEnd;
updateDT.QualityScore=resultDT.rows[i].QualityScore;
updateDT.QualityScoreUpdatedBy=QualityUpdatedBy;
updateDT1.AddRow(updateDT);
Things[productionPlannerDT].UpdateDataTableEntries({
sourceType: undefined /* STRING */,
values: updateDT1 /* INFOTABLE */,
location: undefined /* LOCATION */,
source: undefined /* STRING */,
tags: undefined /* TAGS */
});
}
