cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Can't Update the table

SP_9715784
12-Amethyst

Can't Update the table

This is the program I have written and I am getting an output in the form InfoTable, when I am trying to add an row or trying to  change the timestamp, the table has no effect on it showing the same values as previous !!

 

Code: 

 

var PropertyName = "PumpRunSignal";
var result2 = Things["LVPump100"].QueryNamedPropertyHistory({
propertyNames: {
"rows": [{
"name" : PropertyName
}],
"dataShape": {
"fieldDefinitions":{
"name":{
"name" : "name",
"aspects" :{},
"description": "",
"baseType":"STRING",
"ordinal": 1
},
"description": {
"name" : "description",
"aspects" :{},
"description": "",
"baseType":"STRING",
"ordinal": 2
}
} 
} 
} /* INFOTABLE */,
maxItems: undefined /* NUMBER */,
query: undefined /* QUERY */,
maxDataItems: 500000 /* NUMBER */,
startDate: startDate /* DATETIME */,
endDate: endDate /* DATETIME */,
oldestFirst: true /* BOOLEAN */,
dataQuery: undefined /* QUERY */
});

var result = result2;

var oldEntry = new Object();
oldEntry.timestamp = "2020-10-01";
result.AddRow(oldEntry);

  

 

Thanks & Regards, 

Shashi Preetham.

ACCEPTED SOLUTION

Accepted Solutions

I tested your code in a service with one of my own properties and was able to get the expected result : an infotable displaying my property history followed by an additional row looking like this :

2020-12-04_15-54-42.png

 

Make sure to show enough rows by selecting an appropriate value from the "Max Display Rows" dropdown list : 

2020-12-04_15-57-12.png

View solution in original post

2 REPLIES 2

I tested your code in a service with one of my own properties and was able to get the expected result : an infotable displaying my property history followed by an additional row looking like this :

2020-12-04_15-54-42.png

 

Make sure to show enough rows by selecting an appropriate value from the "Max Display Rows" dropdown list : 

2020-12-04_15-57-12.png

SP_9715784
12-Amethyst
(To:c_lowy)

Thanks @c_lowy  for the help !!

Announcements


Top Tags