Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hey Ankit Gupta,
thanks for your answer.
Other question:
I want to write an service which calls QueryPropertyHistory in order to fill a time chart.
For that, I again use the GetThingnameForIdentifier service to find the proper thing which I want to retrieve the properties of.
The result should be an infotable so that I can bind the chart with All Data.
My service looks like following:
when testing this service I get following error:
Any suggestions?
Thank you for helping me out!
Theresa ~
Message was edited by: Sushant Pandey branched from https://community.thingworx.com/thread/41652?sr=inbox&ru=13444
Correct way is:
var params = {
identifier: Id /* STRING */
};
// result: THINGNAME
var thingname = Resources["EntityServices"].GetThingNameForIdentifier(params);
//Things[thingname].temperature= temperature;
var params1 = {
oldestFirst: undefined /* BOOLEAN */,
maxItems: undefined /* NUMBER */,
endDate: undefined /* DATETIME */,
query: undefined /* QUERY */,
startDate: undefined /* DATETIME */
};
// result: INFOTABLE
var result = Things[thingname].QueryPropertyHistory(params1);