Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Let me clarify this problem:
I have a properties "doorSensor" and the value is true/false - which represent for open and close the door.
I used general service "QueryBooleanPropertyHistory" to get all the result in a week, which return a list of time and the value true/false.
How can I use aggregate function with this result , I need a total of times that door is open and close. Is it relate something with text field query in the service ?
Hi vietanh vu,
I think you are on the Right track.
You can use aggregates as COUNT and group by column using groupByColumns to get the total count for open and close.
var params = {
t: undefined /* INFOTABLE */,
columns: undefined /* STRING */,
aggregates: undefined /* STRING */,
groupByColumns: undefined /* STRING */
};
// result: INFOTABLE
var result = Resources["InfoTableFunctions"].Aggregate(params);
Do let me know if you face any issue.