Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi,
I am currently pushing data up to ThingWorx Composer via an API call which is being stored in a valuestream. Is there any way to convert all this data into an infotable that I can call while writing services?
Thanks!
Solved! Go to Solution.
@RS_9963079 : You can use querypropertyhistory service at Thing level which gives you value stream data. If you specifically want to assign it to an infotable property than just assign the result to the property
Ex:
var result = Things["thingname"].QueryPropertyHistory({
oldestFirst: undefined /* BOOLEAN */,
maxItems: undefined /* NUMBER */,
endDate: undefined /* DATETIME */,
query: undefined /* QUERY */,
startDate: undefined /* DATETIME */
});
me.infitc=result;
@RS_9963079 : You can use querypropertyhistory service at Thing level which gives you value stream data. If you specifically want to assign it to an infotable property than just assign the result to the property
Ex:
var result = Things["thingname"].QueryPropertyHistory({
oldestFirst: undefined /* BOOLEAN */,
maxItems: undefined /* NUMBER */,
endDate: undefined /* DATETIME */,
query: undefined /* QUERY */,
startDate: undefined /* DATETIME */
});
me.infitc=result;
Thanks so much! Can I ask for an example of an appropriate parameter for "query"? Would it be okay to leave it undefined?
@RS_9963079 : Its an optional parameter and need not require to be provided. You can try this service on any thing which has value stream associated and properties 'logged'.