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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Can't Update the table

SP_9715784
11-Garnet

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.

1 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

Thanks @c_lowy  for the help !!

Top Tags