Solved
modify Data Table
hello,everyone!
I want to change the data in the table automatically through the service.Please tell me what to do.
hello,everyone!
I want to change the data in the table automatically through the service.Please tell me what to do.
Hi
Please find below code to update dataTable value through service or subscription
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(DATASHAPENAME)
let data = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: "InfoTable",
dataShapeName: "DATASHAPENAME"
});
let newObject = new Object();
newObject.bName = "test1"; // MAP YOUR INPUT FROM SERVICE OR SUBSCRIPTION
newObject.bDate = 25; // MAP YOUR INPUT FROM SERVICE OR SUBSCRIPTION
data.AddRow(newObject);
// id: STRING
let id = Things["DATATABLENAME"].AddOrUpdateDataTableEntry({
sourceType: undefined /* STRING */,
values: data /* INFOTABLE */,
location: undefined /* LOCATION */,
source: undefined /* STRING */,
tags: undefined /* TAGS */
});
/VR
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.