Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hi,
I have written a new Service which calls the QueryProperyHistory of one of Thing in java. The query to this QueryProperyHistory service uses and filter. below is the query json
{
"filters": {
"filters": [{
"fieldName": "Thing",
"type": "EQ",
"value": "Bogie1"
}, {
"fieldName": "condition_predicted",
"type": "EQ",
"value": "2.0"
}],
"type": "AND"
}
}
I am getting below error. However If I paste the above query directly while executing QueryProperyHistory from composer it works fine, but when I invoke the same service in Java , its not working.
java.lang.Exception: No filters were defined for AND expression
at com.thingworx.types.data.filters.FilterFactory.createFilter(FilterFactory.java:122) ~[thingworx-common-7.4.3-b38.jar:na]
at com.thingworx.types.data.filters.FilterParser.ParseFilters(FilterParser.java:22) ~[thingworx-common-7.4.3-b38.jar:na]
at com.thingworx.types.data.queries.Query.parseQuery(Query.java:47) ~[thingworx-common-7.4.3-b38.jar:na]
at com.thingworx.types.data.queries.Query.parseQuery(Query.java:66) ~[thingworx-common-7.4.3-b38.jar:na]
at com.thingworx.things.Thing.QueryPropertyHistory(Thing.java:7750) [thingworx-platform-common-7.4.3-b38.jar:na]