Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I would to ask if there is anyone that knows how to retrieve the auto generated id value of a value stream entry using a service
Solved! Go to Solution.
var params = { oldestFirst: false /* BOOLEAN */, maxItems: undefined /* NUMBER */, sourceTags: undefined /* TAGS */, endDate: undefined /* DATETIME */, query: undefined /* QUERY */, source: undefined /* STRING */, startDate: undefined /* DATETIME */, tags: undefined /* TAGS */ }; // result: INFOTABLE var data = Things["AlertHistoryStream"].QueryStreamEntriesWithData(params); result = data.rows[0].id
var params = { oldestFirst: false /* BOOLEAN */, maxItems: undefined /* NUMBER */, sourceTags: undefined /* TAGS */, endDate: undefined /* DATETIME */, query: undefined /* QUERY */, source: undefined /* STRING */, startDate: undefined /* DATETIME */, tags: undefined /* TAGS */ }; // result: INFOTABLE var data = Things["AlertHistoryStream"].QueryStreamEntriesWithData(params); result = data.rows[0].id
i would set maxItems to 1 to speed things up.
Is there a particular reason why you need to know the id?
Yeah. That's Good.