JSON in repository to InfoTable is returning nothing
Hi all,
My code to convert a JSON file into a Infotable is returning only the columns title and nothing else as you can see at image below:

Believe me, I read all PTC articles, cases, and topics here in this community and tried all suggestion, but it simply does not work.
So, can anyone help me with this? Below is the code:
var params = {
proxyScheme: undefined /* STRING */,
headers: undefined /* JSON */,
ignoreSSLErrors: true /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: undefined /* BOOLEAN */,
withCookies: undefined /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: "http://localhost:9090/Thingworx/FileRepositories/TrainingRepository/JSON/GetMachineGreen_Original.json" /* STRING */,
timeout: undefined /* NUMBER */,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: JSON
var data = Resources["ContentLoaderFunctions"].GetJSON(params);
var params = {
infoTableName: "InfoTable" /* STRING */,
dataShapeName: "CobotDataShape" /* DATASHAPENAME */
};
// result: INFOTABLE
var CobotInfoTable = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
var tableLength = CobotInfoTable.rows.length;
for (var x = 0; x < tableLength; x++) {
var row = CobotInfoTable.rows[x];
//Your code here
CobotInfoTable.AddRow({
AddAdmin:data.AddAdmin,
AirPressureStatus:data.AirPressureStatus,
BaseFPLSealantSpeed:data.BaseFPLSealantSpeed,
BaseWACLSealantSpeed:data.BaseWACLSealantSpeed,
CalculatedFPLVel:data.CalculatedFPLVel,
CalculatedWACLVel:data.CalculatedWACLVel,
CancelJob:data.CancelJob,
CurrentSiliconBarcode:data.CurrentSiliconBarcode,
DisplayStopReason:data.DisplayStopReason,
EnabledTasks:data.EnabledTasks,
EventErrors:data.EventErrors,
EventInfos:data.EventInfos,
EventWarnings:data.EventWarnings,
ExtEStop:data.ExtEStop,
FPLACreated:data.FPLACreated,
FPLAExpected:data.FPLAExpected,
FPLAMonth:data.FPLAMonth,
FPLBCreated:data.FPLBCreated,
FPLBExpected:data.FPLBExpected,
FPLBMonth:data.FPLBMonth,
FPLIdealCycleTime:data.FPLIdealCycleTime,
FPLSiliconSpeed:data.FPLSiliconSpeed,
FastenerDuration:data.FastenerDuration,
Humidity:data.Humidity,
HumidityMax:data.HumidityMax,
HumidityMin:data.HumidityMin,
IdleTime:data.IdleTime,
LimitsOverride:data.LimitsOverride,
LocalEStop:data.LocalEStop,
LogoutOperator:data.LogoutOperator,
MaxFPLQty:data.MaxFPLQty,
MaxWACLQty:data.MaxWACLQty,
NewJob:data.NewJob,
RemoveAdmin:data.RemoveAdmin,
ResetEnabled:data.ResetEnabled,
RobotHeartbeat:data.RobotHeartbeat,
RobotStoppage:data.RobotStoppage,
ScanAddAdmin:data.ScanAddAdmin,
ScanOperator:data.ScanOperator,
ScanPartBarcode:data.ScanPartBarcode,
ScanRemoveAdmin:data.ScanRemoveAdmin,
ScanSiliconBarcode:data.ScanSiliconBarcode,
ShiftAvailability:data.ShiftAvailability,
ShiftPerformance:data.ShiftPerformance,
SiliconChange:data.SiliconChange,
SiliconOverride:data.SiliconOverride,
SiliconPurge:data.SiliconPurge,
SiliconPurgeAllowed:data.SiliconPurgeAllowed,
SiliconRemaining:data.SiliconRemaining,
SiliconReset:data.SiliconReset,
StartEnabled:data.StartEnabled,
StopEnabled:data.StopEnabled,
Temperature:data.Temperature,
TemperatureMax:data.TemperatureMax,
TemperatureMin:data.TemperatureMin,
TemperatureOverride:data.TemperatureOverride,
TotalCycleTime:data.TotalCycleTime,
ViscosityFunctionBaseTemp:data.ViscosityFunctionBaseTemp,
ViscosityFunctionC:data.ViscosityFunctionC,
ViscosityFunctionX1:data.ViscosityFunctionX1,
ViscosityFunctionX2:data.ViscosityFunctionX2,
WACLACreated:data.WACLACreated,
WACLAExpected:data.WACLAExpected,
WACLAMonth:data.WACLAMonth,
WACLBCreated:data.WACLBCreated,
WACLBExpected:data.WACLBExpected,
WACLBMonth:data.WACLBMonth,
WACLIdealCycleTime:data.WACLIdealCycleTime,
WACLSiliconSpeed:data.WACLSiliconSpeed,
PowerConsumption:data.PowerConsumption,
MonthlyPowerTarget:data.MonthlyPowerTarget,
MonthlyAirConsumption:data.MonthlyAirConsumption,
PrimaryKey:2});
}
result = CobotInfoTable;
The JSON file has no arrays or group or something like this, it is just straight forward with objects.
Thanks in advance!
Best Regards,
Felipe Duarte


