Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
What is the infotable format in javascript? I don't know how to input the infotable when I use the function "SetPropertyValues".
Solved! Go to Solution.
Here is a sample of setting a property of a thing using SetPropertyValues.
var myInfoTable = { dataShape: { fieldDefinitions : {} }, rows: [] };
myInfoTable.dataShape.fieldDefinitions["safety"] = {
name: "safety",
baseType: "BOOLEAN"
};
myInfoTable.rows=[{safety:true}];
Things["AquaponicsThing"].SetPropertyValues({
values: myInfoTable
});
This can be done much more easily within a service by just doing:
Things["AquaponicsThing"].safety = true;
Here is a sample of setting a property of a thing using SetPropertyValues.
var myInfoTable = { dataShape: { fieldDefinitions : {} }, rows: [] };
myInfoTable.dataShape.fieldDefinitions["safety"] = {
name: "safety",
baseType: "BOOLEAN"
};
myInfoTable.rows=[{safety:true}];
Things["AquaponicsThing"].SetPropertyValues({
values: myInfoTable
});
This can be done much more easily within a service by just doing:
Things["AquaponicsThing"].safety = true;
Thanks!