在表格中显示没有数据形状的信息表

时间:2019-02-06 07:02:19

标签: iot thingworx

我有一个返回带有两列信息表的信息的服务:代码和酋长国。但是由于某种原因,我不想在服务返回的数据形状字段中给出数据形状,所以我在代码中给出了它,问题是我无法在网格中显示返回的信息表,请咨询我来解决这个问题。

var params = {infoTableName: "myinfoTable"};


var result = Resources["InfoTableFunctions"].CreateInfoTable(params);

result.AddField({ name: "code", baseType: "STRING" });
result.AddField({name: "emirate", baseType: "STRING" });


var newEntry = new Object();
newEntry.emirate = "Abu Dhabi";
newEntry.code = "AUH";
result.AddRow(newEntry);

var newEntry = new Object();
newEntry.emirate = "Ajman";
newEntry.code = "AJM";
result.AddRow(newEntry);

1 个答案:

答案 0 :(得分:0)

此代码现在可以正常使用,我在mashup连接中遇到问题